public inbox for glibc-bugs-regex@sourceware.org help / color / mirror / Atom feed
From: "mbuilov at gmail dot com" <sourceware-bugzilla@sourceware.org> To: glibc-bugs-regex@sourceware.org Subject: [Bug regex/26026] New: __wcrtomb called with undefined conversion state Date: Sat, 23 May 2020 07:54:36 +0000 [thread overview] Message-ID: <bug-26026-132@http.sourceware.org/bugzilla/> (raw) https://sourceware.org/bugzilla/show_bug.cgi?id=26026 Bug ID: 26026 Summary: __wcrtomb called with undefined conversion state Product: glibc Version: 2.33 Status: UNCONFIRMED Severity: normal Priority: P2 Component: regex Assignee: unassigned at sourceware dot org Reporter: mbuilov at gmail dot com CC: drepper.fsp at gmail dot com Target Milestone: --- Hi. Please consider the following code fragment of ./posix/regcomp.c: 392 /* ... Else catch all bytes which can start the mbchars. */ 393 for (i = 0; i < cset->nmbchars; ++i) 394 { 395 char buf[256]; 396 mbstate_t state; 397 memset (&state, '\0', sizeof (state)); 398 if (__wcrtomb (buf, cset->mbchars[i], &state) != (size_t) -1) 399 re_set_fastmap (fastmap, icase, *(unsigned char *) buf); here, if __wcrtomb() fails, the variable 'state' becomes "undefined". 400 if ((bufp->syntax & RE_ICASE) && dfa->mb_cur_max > 1) 401 { 402 if (__wcrtomb (buf, __towlower (cset->mbchars[i]), &state) 403 != (size_t) -1) and here __wcrtomb() reuses "undefined" 'state' 404 re_set_fastmap (fastmap, false, *(unsigned char *) buf); 405 } 406 } -- You are receiving this mail because: You are on the CC list for the bug.
reply other threads:[~2020-05-23 7:54 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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-26026-132@http.sourceware.org/bugzilla/ \ --to=sourceware-bugzilla@sourceware.org \ --cc=glibc-bugs-regex@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).