projects
/
musl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ea6d784
)
vfscanf: fix possible invalid free due to uninitialized variable use
author
Julien Ramseier
<j.ramseier@gmail.com>
Wed, 1 Jul 2020 13:12:14 +0000
(15:12 +0200)
committer
Rich Felker
<dalias@aerifal.cx>
Thu, 2 Jul 2020 15:25:44 +0000
(11:25 -0400)
vfscanf() may use the variable 'alloc' uninitialized when taking the
branch introduced by commit
b287cd745c2243f8e5114331763a5a9813b5f6ee
.
Spotted by clang.
src/stdio/vfscanf.c
patch
|
blob
|
history
diff --git
a/src/stdio/vfscanf.c
b/src/stdio/vfscanf.c
index
b5ebc16
..
b78a374
100644
(file)
--- a/
src/stdio/vfscanf.c
+++ b/
src/stdio/vfscanf.c
@@
-57,7
+57,7
@@
int vfscanf(FILE *restrict f, const char *restrict fmt, va_list ap)
{
int width;
int size;
- int alloc;
+ int alloc
= 0
;
int base;
const unsigned char *p;
int c, t;