diff options
author | 2019-11-18 09:16:19 +1030 | |
---|---|---|
committer | 2019-11-18 09:20:10 +1030 | |
commit | 1f67cf9845c5cad787212ca53f3ce0f671ce2798 (patch) | |
tree | 1f9decda690b1c2f76b055a56d25929e64233efc | |
parent | Automatic date update in version.in (diff) | |
download | binutils-gdb-1f67cf9845c5cad787212ca53f3ce0f671ce2798.tar.gz binutils-gdb-1f67cf9845c5cad787212ca53f3ce0f671ce2798.tar.bz2 binutils-gdb-1f67cf9845c5cad787212ca53f3ce0f671ce2798.zip |
PR25198, use of out of date pointer
PR 25198
* prdbg.c (tg_start_class_type): Correct scope of idbuf.
-rw-r--r-- | binutils/ChangeLog | 5 | ||||
-rw-r--r-- | binutils/prdbg.c | 3 |
2 files changed, 6 insertions, 2 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog index adb24a89f08..298a7378854 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,8 @@ +2019-11-18 Alan Modra <amodra@gmail.com> + + PR 25198 + * prdbg.c (tg_start_class_type): Correct scope of idbuf. + 2019-11-08 Alan Modra <amodra@gmail.com> PR 25172 diff --git a/binutils/prdbg.c b/binutils/prdbg.c index 40cf54b8fe9..e582102ab35 100644 --- a/binutils/prdbg.c +++ b/binutils/prdbg.c @@ -2117,6 +2117,7 @@ tg_start_class_type (void *p, const char *tag, unsigned int id, struct pr_handle *info = (struct pr_handle *) p; char *tv = NULL; const char *name; + char idbuf[20]; info->indent += 2; @@ -2131,8 +2132,6 @@ tg_start_class_type (void *p, const char *tag, unsigned int id, name = tag; else { - char idbuf[20]; - sprintf (idbuf, "%%anon%u", id); name = idbuf; } |