Date: Wed, 02 Feb 2022 16:59:49 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 261679] libc/locale/xlocale.c: potential NULL pointer dereference in alloc_locale() Message-ID: <bug-261679-227@https.bugs.freebsd.org/bugzilla/>
index | next in thread | raw e-mail
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=261679 Bug ID: 261679 Summary: libc/locale/xlocale.c: potential NULL pointer dereference in alloc_locale() Product: Base System Version: CURRENT Hardware: Any OS: Any Status: New Severity: Affects Many People Priority: --- Component: bin Assignee: bugs@FreeBSD.org Reporter: phil.stone@gmx.com /usr/src/lib/libc/locale/xlocale.c, line 191 static locale_t alloc_locale(void) { locale_t new = calloc(sizeof(struct _xlocale), 1); new->header.destructor = destruct_locale; new->monetary_locale_changed = 1; new->numeric_locale_changed = 1; return (new); } calloc() return value is not tested. Variable new is always dereferenced, even in the (unexpected) case where it is NULL. -- You are receiving this mail because: You are the assignee for the bug.home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-261679-227>
