Skip to content

Commit

Permalink
Merge pull request memononen#262 from bptato/fix-oob-read
Browse files Browse the repository at this point in the history
Fix OOB read in nsvg__parseColorRGB()
  • Loading branch information
memononen authored Dec 19, 2024
2 parents 93ce879 + 5ed2222 commit ea6a6ac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/nanosvg.h
Original file line number Diff line number Diff line change
Expand Up @@ -1265,7 +1265,7 @@ static unsigned int nsvg__parseColorRGB(const char* str)
while (*str && nsvg__isdigit(*str)) str++; // skip fractional part
}
if (*str == '%') str++; else break;
while (nsvg__isspace(*str)) str++;
while (*str && nsvg__isspace(*str)) str++;
if (*str == delimiter[i]) str++;
else break;
}
Expand Down

0 comments on commit ea6a6ac

Please sign in to comment.