public inbox for glibc-bugs@sourceware.org help / color / mirror / Atom feed
From: "msebor at gmail dot com" <sourceware-bugzilla@sourceware.org> To: glibc-bugs@sourceware.org Subject: [Bug build/26779] benign use after realloc at localealias.c:329 Date: Tue, 27 Oct 2020 21:21:10 +0000 [thread overview] Message-ID: <bug-26779-131-phgTbOF3LB@http.sourceware.org/bugzilla/> (raw) In-Reply-To: <bug-26779-131@http.sourceware.org/bugzilla/> https://sourceware.org/bugzilla/show_bug.cgi?id=26779 --- Comment #2 from Martin Sebor <msebor at gmail dot com> --- Another instance is in argz-insert.c: argz-insert.c: In function ‘__argz_insert’: argz-insert.c:52:39: warning: dereferencing a freed pointer [-Wuse-after-free=] 52 | before = new_argz + (before - *argz); | ^~~~~ argz-insert.c:48:22: note: freed by ‘realloc’ here 48 | char *new_argz = realloc (*argz, new_argz_len); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The code is straightforward: the value of *argz after a successful call to realloc with it as an argument is (strictly speaking) indeterminate. char *new_argz = realloc (*argz, new_argz_len); if (new_argz) { before = new_argz + (before - *argz); -- You are receiving this mail because: You are on the CC list for the bug.
next prev parent reply other threads:[~2020-10-27 21:21 UTC|newest] Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-10-23 17:12 [Bug build/26779] New: " msebor at gmail dot com 2020-10-23 21:14 ` [Bug build/26779] " msebor at gmail dot com 2020-10-27 21:21 ` msebor at gmail dot com [this message] 2020-10-27 21:41 ` msebor at gmail dot com 2022-01-12 17:16 ` msebor at gmail dot com 2022-01-12 17:20 ` msebor at gmail dot com 2022-01-14 0:28 ` msebor at gmail dot com 2022-01-26 17:43 ` msebor at gmail dot com 2022-01-26 20:24 ` carlos at redhat dot com 2022-02-09 14:05 ` vvinayag at arm dot com 2022-02-09 14:59 ` schwab@linux-m68k.org 2022-02-09 16:13 ` vvinayag at arm dot com 2024-01-11 9:33 ` fweimer at redhat dot com
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-26779-131-phgTbOF3LB@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).