]> git.ipfire.org Git - thirdparty/gettext.git/commit
libgrep: Don't crash upon out-of-memory.
authorBruno Haible <bruno@clisp.org>
Fri, 2 Jun 2023 23:22:53 +0000 (01:22 +0200)
committerBruno Haible <bruno@clisp.org>
Fri, 2 Jun 2023 23:22:53 +0000 (01:22 +0200)
commit45318a260ec29ea6d785ca4f3bd72f11345415d3
tree7792831590ab04eec25d13f6a9b82c6fd7831de6
parent87fa86ba0ea90df0563d92a6bd800f12830743b6
libgrep: Don't crash upon out-of-memory.

Pinpointed by gcc 13 warning:
warning: use of possibly-NULL ‘mb_properties’ where non-null expected [CWE-690] [-Wanalyzer-possible-null-argument]

* gettext-tools/libgrep/m-fgrep.c (check_multibyte_string): Check the malloc()
return value.
gettext-tools/libgrep/m-fgrep.c