Browse Source

Merge pull request #222 from 0vercl0k/fbl_fixoob2

Fix OOB in nsvg__parseUrl.
pull/218/merge
Mikko Mononen 6 months ago
committed by GitHub
parent
commit
bd16c4e6b2
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      src/nanosvg.h

4
src/nanosvg.h

@ -1681,9 +1681,9 @@ static void nsvg__parseUrl(char* id, const char* str)
{
int i = 0;
str += 4; // "url(";
if (*str == '#')
if (*str && *str == '#')
str++;
while (i < 63 && *str != ')') {
while (i < 63 && *str && *str != ')') {
id[i] = *str++;
i++;
}

Loading…
Cancel
Save