🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by W. Wilson Ho Fri, 15 Sep 1989 04:18
add_file_command() passes invalid address to free()
#257
Author: W. Wilson Ho
Date: Fri, 15 Sep 1989 04:18
32 lines
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
-------------------------------------------------------------------------------
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads