bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Static code analyzer Clang reports possible bug in getopt.c while develo


From: Gustavo Martin Domato
Subject: Static code analyzer Clang reports possible bug in getopt.c while developing gnu-pdf
Date: Wed, 22 Jun 2011 13:07:39 -0300

Hi:

I copy something I wrote on gnu-pdf development mailing list. Static
code analyzer Clang detected a possible bug at line 852. The file
they're using is a copy of the source. To see the report go to
http://www.gnupdf.org/prmgt/clang/report-kFVhsy.html#EndPath


"> lib/getopt.c line 852 - This one is disturbing to me. It shouldn't be
> possible because of the function's preconditions (longopt must be an
> array with a null name at the end), but in the code it appears to be
> that longopt can effectively be null (tested at line 476) and
p=longopt
> is actually derreferenced in the loop control statement at line 852...
I
> trust the gnulib better that me, but..."


Regards,
Gustavo




reply via email to

[Prev in Thread] Current Thread [Next in Thread]