mirror of https://github.com/google/oss-fuzz.git
Fix overflow in binutils fuzz target (#3363)
This commit is contained in:
parent
f585b66235
commit
3f808990af
|
@ -46,7 +46,7 @@ static int objdump_sprintf (void *vf, const char *format, ...)
|
|||
va_end (args);
|
||||
f->pos += n;
|
||||
//reset to keep just one line
|
||||
if (f->pos != 0 && f->buffer[f->pos - 1] == '\n')
|
||||
if (f->pos != 0 && f->buffer[f->pos - 1] == '\n' && f->pos <= MAX_TEXT_SIZE)
|
||||
f->pos = 0;
|
||||
return n;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue