libctf: allow ctf_type_lname of a null pointer.
authorNick Alcock <nick.alcock@oracle.com>
Thu, 8 Aug 2019 15:53:48 +0000 (16:53 +0100)
committerNick Alcock <nick.alcock@oracle.com>
Thu, 3 Oct 2019 16:04:56 +0000 (17:04 +0100)
commit1a6ab13e712348c59c2757457b9f913a333f3c92
tree268bd56d93768d66835b60932e85a8cbb33fa606
parent99dc3ebdfff927b30db58117d7bd80586e273669
libctf: allow ctf_type_lname of a null pointer.

The code was meant to handle this, but accidentally dereferenced the
null pointer before checking it for nullity.

v5: fix tabdamage.

libctf/
* ctf-types.c (ctf_type_name): Don't strlen a potentially-
null pointer.
libctf/ChangeLog
libctf/ctf-types.c