Browse Source

vfscanf: fix possible invalid free due to uninitialized variable use

vfscanf() may use the variable 'alloc' uninitialized when taking the
branch introduced by commit b287cd745c.
Spotted by clang.
master
Julien Ramseier 6 years ago
committed by Rich Felker
parent
commit
a62df9c9b7
  1. 2
      src/stdio/vfscanf.c

2
src/stdio/vfscanf.c

@ -57,7 +57,7 @@ int vfscanf(FILE *restrict f, const char *restrict fmt, va_list ap)
{ {
int width; int width;
int size; int size;
int alloc; int alloc = 0;
int base; int base;
const unsigned char *p; const unsigned char *p;
int c, t; int c, t;

Loading…
Cancel
Save