This is the mail archive of the
gdb-testers@sourceware.org
mailing list for the GDB project.
[binutils-gdb] Fix possible bug when no args have been provided to the executable
- From: sergiodj+buildbot at sergiodj dot net
- To: gdb-testers at sourceware dot org
- Date: Thu, 08 Jun 2017 17:23:23 -0400
- Subject: [binutils-gdb] Fix possible bug when no args have been provided to the executable
- Authentication-results: sourceware.org; auth=none
*** TEST RESULTS FOR COMMIT 2f91880f3afb3cc521111dfcc99b214c77aa97a1 ***
Author: Sergio Durigan Junior <sergiodj@redhat.com>
Branch: master
Commit: 2f91880f3afb3cc521111dfcc99b214c77aa97a1
Fix possible bug when no args have been provided to the executable
Hi,
This bug is related to:
<https://sourceware.org/ml/gdb-patches/2017-06/msg00216.html>
On stringify_argv, we have to check if args[0] is not NULL before
stringifying anything, otherwise we might do the wrong thing when
trimming the "ret" string in the end. args[0] will be NULL when no
arguments are passed to the inferior that will be started.
Checked in as obvious.
gdb/ChangeLog:
2017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
* common/common-utils.c (stringify_argv): Check for "arg[0] !=
NULL".