mirror of
https://https.git.savannah.gnu.org/git/gnulib.git
synced 2026-05-13 23:23:51 +00:00
vasnprintf: fix potential use after free
* lib/vasnprintf.c (VASNPRINTF): Fix free-memory read, flagged by clang-analyzer 3.4.2.
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
2014-12-06 Pádraig Brady <P@draigBrady.com>
|
||||
|
||||
vasnprintf: fix potential use after free
|
||||
* lib/vasnprintf.c (VASNPRINTF): Fix free-memory read,
|
||||
flagged by clang-analyzer 3.4.2.
|
||||
|
||||
2014-12-05 Pádraig Brady <P@draigBrady.com>
|
||||
|
||||
filevercmp, posixtm: avoid compiler warnings with -O3
|
||||
|
||||
@@ -5184,13 +5184,13 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
|
||||
free (result);
|
||||
if (buf_malloced != NULL)
|
||||
free (buf_malloced);
|
||||
CLEANUP ();
|
||||
errno =
|
||||
(saved_errno != 0
|
||||
? saved_errno
|
||||
: (dp->conversion == 'c' || dp->conversion == 's'
|
||||
? EILSEQ
|
||||
: EINVAL));
|
||||
CLEANUP ();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user