mailing list of musl libc
 help / color / mirror / code / Atom feed
* New static analysis results
@ 2014-09-04 16:45 Alexander Monakov
  2014-09-04 17:13 ` Rich Felker
  0 siblings, 1 reply; 7+ messages in thread
From: Alexander Monakov @ 2014-09-04 16:45 UTC (permalink / raw)
  To: musl

Hello,

I'm happy to report a few new results from running static code analysis on
musl (from a tool developed where I work).

ctime.c:5
    localtime(t) may return NULL, but that will cause UB in asctime

regexec.c:253
    "return REG_NOMATCH;" in GET_NEXT_WCHAR leaks memory allocated for 'buf'

lookup_serv.c:55
getnameinfo.c:99
    pointless "if (!p) continue;" when "if (!*p) continue;" was probably
    intended

fpathconf.c
    off-by-one error in range check (if (name >= sizeof ...))

Alexander


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-09-05 21:23 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-04 16:45 New static analysis results Alexander Monakov
2014-09-04 17:13 ` Rich Felker
2014-09-05 18:02   ` Rich Felker
2014-09-05 18:39     ` Alexander Monakov
2014-09-05 18:53       ` Rich Felker
2014-09-05 20:50         ` Jens Gustedt
2014-09-05 21:23           ` Rich Felker

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).