]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - gdb/tracectf.c
Add null pointer check in ctf_xfer_partial
authorYao Qi <yao@codesourcery.com>
Fri, 18 Apr 2014 11:22:23 +0000 (19:22 +0800)
committerYao Qi <yao@codesourcery.com>
Sat, 19 Apr 2014 02:36:08 +0000 (10:36 +0800)
commitdac3e7103f2822b42ecbb58e40f70f7ccb802d42
tree71e4f34d0ce96af08b75606abb80abba4d3f6dfa
parent2bca57bacc88e4d81fd92c72f1d4eb42c1372ac8
Add null pointer check in ctf_xfer_partial

I find a gdb crash when gdb reads ctf trace.  The crash is caused by passing
NULL to strcmp.  This patch is to add null pointer check, as what we did
somewhere else in ctf.c.

gdb:

2014-04-19  Yao Qi  <yao@codesourcery.com>

* ctf.c (ctf_xfer_partial): Check 'name' is NULL before strcmp.
gdb/ChangeLog
gdb/ctf.c