]> git.ipfire.org Git - thirdparty/gcc.git/commit - libiberty/cp-demangle.c
libiberty: Always return NULL if d_add_substitution fails.
authormark <mark@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 21 Apr 2017 09:01:56 +0000 (09:01 +0000)
committermark <mark@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 21 Apr 2017 09:01:56 +0000 (09:01 +0000)
commitbd7ba887d7ad9d99210e9734fcd2998a4bb00037
treea7877742e13eda04830c6b97ef5b5822412562dd
parenteb5b3e73121b901b975aa862273500f7d8026252
libiberty: Always return NULL if d_add_substitution fails.

d_add_substitution can fail for various reasons, like when the subs array
is full. If d_add_substitution fails d_substitution should return NULL
early and not try to continue. Every other call of d_add_substitution
is handled in the same way.

libiberty/ChangeLog:

* cp-demangle.c (d_substitution): Return NULL if d_add_substitution
fails.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@247055 138bc75d-0d04-0410-961f-82ee72b054a4
libiberty/ChangeLog
libiberty/cp-demangle.c