This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Fix find_separate_debug_file buffer overrun [Re: gdb crash during read of separate debuginfo]


>>>>> "Jan" == Jan Kratochvil <jan.kratochvil@redhat.com> writes:

Richard> We experienced crashes when running gdb inside out installation
Richard> system which has /usr symlinked to some location beyond /mnt.
Richard> The issue is that the code doesn't deal with the case that
Richard> the result of lrealpath is longer than its argument.

Jan> thanks, posting updated patch for FSF GDB as it is not a Fedora regression.
Jan> This attached patch has not been reviewed by Richard Guenther.

Jan> 2009-08-02  Richard Guenther  <rguenther@suse.de>
Jan> 	    Jan Kratochvil  <jan.kratochvil@redhat.com>
Jan> 	Fix memory corruption on reread of file through a symbolic link.
Jan> 	* symfile.c (find_separate_debug_file): Initialize CANON_NAME earlier.
Jan> 	Allocate DEBUGFILE with length based on CANON_NAME.  Free CANON_NAME on
Jan> 	all the return paths.

This looks good to me.
Ok.

Jan> I do not push much to get the testcase accepted.

Is there something in particular you think is wrong with it?  It looks
ok to me, but your comment makes me wonder what subtlety I missed.

Tom


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]