mailing list of musl libc
 help / color / mirror / code / Atom feed
From: John Regehr <regehr@cs.utah.edu>
To: musl@lists.openwall.com
Subject: uninitialized variable
Date: Thu, 19 May 2016 17:28:58 +0200	[thread overview]
Message-ID: <e8f9f75f-9aef-e771-e6ad-4045e6fcbf1e@cs.utah.edu> (raw)

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


             reply	other threads:[~2016-05-19 15:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-19 15:28 John Regehr [this message]
2016-05-20 20:44 ` Szabolcs Nagy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e8f9f75f-9aef-e771-e6ad-4045e6fcbf1e@cs.utah.edu \
    --to=regehr@cs.utah.edu \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).