[PATCH 1 of 7] parsers: fix leak of err when asciilower hits a unicode decode error
Sean Farley
sean.michael.farley at gmail.com
Fri Jan 23 16:06:57 CST 2015
Augie Fackler writes:
> # HG changeset patch
> # User Augie Fackler <augie at google.com>
> # Date 1422044344 18000
> # Fri Jan 23 15:19:04 2015 -0500
> # Branch stable
> # Node ID 3435cf143b791612214a871337e8549e7d5c26a6
> # Parent de519517f597abd733961a8c549074eecb6c0ab3
> parsers: fix leak of err when asciilower hits a unicode decode error
>
> This is one of many errors detected in parsers.c by cpychecker[1]. I
> haven't gone through all of them yet.
>
> 1: https://gcc-python-plugin.readthedocs.org/en/latest/index.html
>
> diff --git a/mercurial/parsers.c b/mercurial/parsers.c
> --- a/mercurial/parsers.c
> +++ b/mercurial/parsers.c
> @@ -45,11 +45,11 @@ static char lowertable[128] = {
> '\x30', '\x31', '\x32', '\x33', '\x34', '\x35', '\x36', '\x37',
> '\x38', '\x39', '\x3a', '\x3b', '\x3c', '\x3d', '\x3e', '\x3f',
> '\x40',
> - '\x61', '\x62', '\x63', '\x64', '\x65', '\x66', '\x67', /* A-G */
> + '\x61', '\x62', '\x63', '\x64', '\x65', '\x66', '\x67', /* A-G */
What kind of whitespace mode are you using that reindents these bits
incorrectly?
> '\x68', '\x69', '\x6a', '\x6b', '\x6c', '\x6d', '\x6e', '\x6f', /* H-O */
> '\x70', '\x71', '\x72', '\x73', '\x74', '\x75', '\x76', '\x77', /* P-W */
> '\x78', '\x79', '\x7a', /* X-Z */
> - '\x5b', '\x5c', '\x5d', '\x5e', '\x5f',
> + '\x5b', '\x5c', '\x5d', '\x5e', '\x5f',
Same question here.
More information about the Mercurial-devel
mailing list