Article View: gnu.gdb.bug
Article #257add_file_command() passes invalid address to free()
From: W. Wilson Ho
Date: Fri, 15 Sep 1989 04:18
Date: Fri, 15 Sep 1989 04:18
32 lines
1509 bytes
1509 bytes
gdb version 3.2, running under Sun 3 Unix 4.3 release 3.4
In file dbxread.c, function add_file_command() :
> add_file_command (arg_string)
> char* arg_string;
> {
> [ ...omitted... ]
>
> name = arg_string;
>
> [ ...omitted...]
>
> make_cleanup (free_current_contents, &name);
Variable "name" was first assigned the value of the argument
"arg_string" and then its value is passed to free_current_contents(),
thus creating an error for passing invalid address to free(). I think
either a savestring() should be called or the call to make_cleanup()
should be removed.
Thanks for your attention!
Wilson Ho
-------------------------------------------------------------------------------
W. Wilson Ho | INTERNET: how@ivy.ucdavis.edu
Division of Computer Science | UUCP: ...!ucbvax!ucdavis!ivy!how
EECS Department | BITNET: wwho@ucdavis.bitnet
University of California |
Davis, CA 95616 | Phone: (916)752-7109
-------------------------------------------------------------------------------
Technical Details
Message-ID:
<8909150418.AA25742@ivy.ucdavis.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!bionet!apple!agate!ucbvax!tut.cis.ohio-state.edu!IVY.UCDAVIS.EDU!howShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!bionet!apple!agate!ucbvax!tut.cis.ohio-state.edu!IVY.UCDAVIS.EDU!how From: how@IVY.UCDAVIS.EDU (W. Wilson Ho) Newsgroups: gnu.gdb.bug Subject: add_file_command() passes invalid address to free() Message-ID: <8909150418.AA25742@ivy.ucdavis.edu> Date: 15 Sep 89 04:18:20 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 32