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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
2 additions and
2 deletions
-
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++; |
|
|
|
} |
|
|
|