public inbox for glibc-bugs@sourceware.org help / color / mirror / Atom feed
From: "konstantin.s.serebryany at gmail dot com" <sourceware-bugzilla@sourceware.org> To: glibc-bugs@sourceware.org Subject: [Bug libc/18096] null deref in wordexp/parse_dollars/parse_arith Date: Mon, 09 Mar 2015 18:56:00 -0000 [thread overview] Message-ID: <bug-18096-131-3hXQlKpz2i@http.sourceware.org/bugzilla/> (raw) In-Reply-To: <bug-18096-131@http.sourceware.org/bugzilla/> https://sourceware.org/bugzilla/show_bug.cgi?id=18096 --- Comment #2 from Kostya Serebryany <konstantin.s.serebryany at gmail dot com> --- One more case: char *p = strdup("[a:*${C?}"); ==3359== at 0x4F1EF33: parse_param (wordexp.c:1843) ==3359== by 0x4F1EF33: parse_dollars (wordexp.c:2102) ==3359== by 0x4F20598: parse_glob (wordexp.c:490) ==3359== by 0x4F20598: wordexp (wordexp.c:2416) This time, the bug is here: @@ -1841,7 +1841,7 @@ envsubst: { const char *str = pattern; - if (str[0] == '\0') + if (str && str[0] == '\0') str = _("parameter null or not set"); __fxprintf (NULL, "%s: %s\n", env, str); An interesting side question: is wordexp supposed to print anything? -- You are receiving this mail because: You are on the CC list for the bug.
next prev parent reply other threads:[~2015-03-09 18:56 UTC|newest] Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top 2015-03-09 15:31 [Bug libc/18096] New: " konstantin.s.serebryany at gmail dot com 2015-03-09 16:24 ` [Bug libc/18096] " konstantin.s.serebryany at gmail dot com 2015-03-09 18:56 ` konstantin.s.serebryany at gmail dot com [this message] 2015-03-11 6:44 ` carlos at redhat dot com 2015-03-11 8:57 ` schwab@linux-m68k.org 2015-03-11 13:45 ` carlos at redhat dot com 2015-03-11 14:03 ` schwab@linux-m68k.org 2015-03-11 16:12 ` konstantin.s.serebryany at gmail dot com 2015-03-11 16:20 ` carlos at redhat dot com 2015-03-11 16:34 ` carlos at redhat dot com 2015-03-11 22:23 ` bugdal at aerifal dot cx 2015-03-19 15:09 ` fweimer at redhat dot com 2015-07-12 7:44 ` neleai at seznam dot cz 2015-07-21 10:10 ` fweimer at redhat dot com 2015-08-27 22:26 ` [Bug glob/18096] " jsm28 at gcc dot gnu.org 2023-03-28 13:59 ` adhemerval.zanella at linaro dot org
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=bug-18096-131-3hXQlKpz2i@http.sourceware.org/bugzilla/ \ --to=sourceware-bugzilla@sourceware.org \ --cc=glibc-bugs@sourceware.org \ /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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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 read-only IMAP folder(s) and NNTP newsgroup(s).