]> git.ipfire.org Git - thirdparty/gettext.git/commit
libtextstyle: Don't crash if xgethostname() returns NULL.
authorBruno Haible <bruno@clisp.org>
Fri, 2 Jun 2023 23:22:24 +0000 (01:22 +0200)
committerBruno Haible <bruno@clisp.org>
Fri, 2 Jun 2023 23:22:24 +0000 (01:22 +0200)
commit87fa86ba0ea90df0563d92a6bd800f12830743b6
tree8c75855d4edb2d9aff340ffad19634bf5ebc9771
parentfb24c965dbd4145d6757f7e2aa65771b4bc08bab
libtextstyle: Don't crash if xgethostname() returns NULL.

Pinpointed by gcc 13 warning:
warning: dereference of possibly-NULL ā€˜p’ [CWE-690] [-Wanalyzer-possible-null-dereference]

* libtextstyle/gnulib-local/lib/term-ostream.oo.c (term_ostream_create): If
xgethostname() returns NULL, use a dummy hash code.
libtextstyle/gnulib-local/lib/term-ostream.oo.c