mailing list of musl libc
 help / color / mirror / code / Atom feed
* uninitialized variable
@ 2016-05-19 15:28 John Regehr
  2016-05-20 20:44 ` Szabolcs Nagy
  0 siblings, 1 reply; 2+ messages in thread
From: John Regehr @ 2016-05-19 15:28 UTC (permalink / raw)
  To: musl

This call:

regcomp(&r, "^(b+|||(CW*)*|){5,}{53}*+)^?5,}", REG_EXTENDED);

ends up using uninitialized memory like so:

regcomp.c:221:[kernel] warning: accessing uninitialized left-value:
                   assert \initialized(&right->num_submatches);
                   stack: tre_ast_new_catenation :: regcomp.c:1764 <-
                          tre_copy_ast :: regcomp.c:1916 <-
                          tre_expand_ast :: regcomp.c:2771 <-
                          musl_regcomp :: foo.c:9 <-
                          main

Having crap in this field seems bad since it is used to compute a malloc 
size.

John


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

end of thread, other threads:[~2016-05-20 20:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-19 15:28 uninitialized variable John Regehr
2016-05-20 20:44 ` Szabolcs Nagy

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).