From: Daniel Berlin <dan@cgsoftware.com>
To: gdb-patches@sources.redhat.com
Subject: [PATCH] Fix crash on demangle style completion
Date: Mon, 16 Apr 2001 07:35:00 -0000 [thread overview]
Message-ID: <m2pueczzcn.fsf@dynamic-addr-83-177.resnet.rochester.edu> (raw)
This is an obvious fix (Just try completing on the demangle style, and
look what happens), so i'm checking it in.
2001-04-16 Daniel Berlin <dan@cgsoftware.com>
* demangle.c (_initialize_demangler): Use xcalloc on the
demangling_style_names, and make it a null terminated array of
names, to avoid a crash.
Index: demangle.c
===================================================================
RCS file: /cvs/src/src/gdb/demangle.c,v
retrieving revision 1.7
diff -c -3 -p -w -B -b -r1.7 demangle.c
*** demangle.c 2001/03/06 08:21:06 1.7
--- demangle.c 2001/04/16 14:34:53
*************** _initialize_demangler (void)
*** 186,192 ****
libiberty_demanglers[ndems].demangling_style != unknown_demangling;
ndems++)
;
! demangling_style_names = xmalloc (ndems * sizeof (char *));
for (i = 0;
libiberty_demanglers[i].demangling_style != unknown_demangling;
i++)
--- 186,192 ----
libiberty_demanglers[ndems].demangling_style != unknown_demangling;
ndems++)
;
! demangling_style_names = xcalloc (ndems + 1, sizeof (char *));
for (i = 0;
libiberty_demanglers[i].demangling_style != unknown_demangling;
i++)
--
I have two very rare photographs. One is a picture of Houdini
locking his keys in his car. The other is a rare photograph of
Norman Rockwell beating up a child.
next reply other threads:[~2001-04-16 7:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-04-16 7:35 Daniel Berlin [this message]
2001-04-16 8:35 ` Eli Zaretskii
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=m2pueczzcn.fsf@dynamic-addr-83-177.resnet.rochester.edu \
--to=dan@cgsoftware.com \
--cc=gdb-patches@sources.redhat.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox