mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-19 06:15:26 +00:00
Fix potential uninitialized read
When analyzing the buffer that is handed to the first_object_id function we carefully check to make sure that we don't read past the end of the input buffer but there was still one code path that could have us do just that. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
0fcdd011f5
commit
dad93c425e
1 changed files with 1 additions and 1 deletions
|
@ -327,7 +327,7 @@ static char *first_object_id_val(char* buf)
|
|||
return NULL;
|
||||
bufend = buf + strlen(buf);
|
||||
object = strstr(buf, "object_id");
|
||||
if (object) {
|
||||
if (object && object + 14 < bufend) {
|
||||
/* get the value */
|
||||
char tmp[10];
|
||||
char *p = object + 14;
|
||||
|
|
Loading…
Add table
Reference in a new issue