[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] vasnprintf: fix potential use after free
From: |
Pádraig Brady |
Subject: |
[PATCH] vasnprintf: fix potential use after free |
Date: |
Sat, 6 Dec 2014 01:23:33 +0000 |
* lib/vasnprintf.c (VASNPRINTF): Fix free-memory read,
flagged by clang-analyzer 3.4.2.
---
ChangeLog | 6 ++++++
lib/vasnprintf.c | 2 +-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index 1c4a7ab..41207ea 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2014-12-06 Pádraig Brady <address@hidden>
+
+ 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 <address@hidden>
filevercmp, posixtm: avoid compiler warnings with -O3
diff --git a/lib/vasnprintf.c b/lib/vasnprintf.c
index 0484c4e..223be07 100644
--- a/lib/vasnprintf.c
+++ b/lib/vasnprintf.c
@@ -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;
}
--
2.1.0
- [PATCH] vasnprintf: fix potential use after free,
Pádraig Brady <=
- Re: [PATCH] vasnprintf: fix potential use after free, Eric Blake, 2014/12/05
- Re: [PATCH] vasnprintf: fix potential use after free, Pádraig Brady, 2014/12/06
- Re: [PATCH] vasnprintf: fix potential use after free, Pádraig Brady, 2014/12/06
- Re: [PATCH] vasnprintf: fix potential use after free, Paul Eggert, 2014/12/07
- Re: [PATCH] vasnprintf: fix potential use after free, Pádraig Brady, 2014/12/08
- Re: [PATCH] vasnprintf: fix potential use after free, Eric Blake, 2014/12/08
- Re: [PATCH] vasnprintf: fix potential use after free, Paul Eggert, 2014/12/08