Changeset 233404 in webkit
- Timestamp:
- Jun 30, 2018, 6:15:38 PM (7 years ago)
- Location:
- trunk/Source/ThirdParty
- Files:
-
- 3 edited
-
ChangeLog (modified) (1 diff)
-
xdgmime/src/xdgmimecache.c (modified) (2 diffs)
-
xdgmime/src/xdgmimeglob.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/ThirdParty/ChangeLog
r233255 r233404 1 2018-06-30 Michael Catanzaro <mcatanzaro@igalia.com> 2 3 Fix off-by-one error in xdg_mime_get_simple_globs 4 https://bugs.webkit.org/show_bug.cgi?id=186554 5 6 Reviewed by Daniel Bates. 7 8 We have an off-by-one error here in some code that was added for WebKit. (This is not an 9 issue with upstream xdgmime.) 10 11 No new tests. This problem is caught by TestDownloads, but only when running with ASan 12 enabled. 13 14 * xdgmime/src/xdgmimecache.c: 15 (get_simple_globs): 16 * xdgmime/src/xdgmimeglob.c: 17 (get_simple_globs): 18 1 19 2018-06-27 Michael Catanzaro <mcatanzaro@igalia.com> 2 20 -
trunk/Source/ThirdParty/xdgmime/src/xdgmimecache.c
r233255 r233404 1048 1048 int i; 1049 1049 1050 assert (*n >= 0); 1051 assert (depth >= 0); 1052 1050 1053 if (*n >= n_globs) 1051 1054 return FALSE; … … 1056 1059 1057 1060 if (strcasecmp (cache->buffer + mime_offset, mime) == 0) { 1058 globs[*n] = malloc ( depth* sizeof (char));1061 globs[*n] = malloc ((depth + 1) * sizeof (char)); 1059 1062 for (i = 0; i < depth; i++) 1060 1063 globs[*n][depth - i - 1] = prefix[i]; -
trunk/Source/ThirdParty/xdgmime/src/xdgmimeglob.c
r214338 r233404 485 485 int depth) 486 486 { 487 assert (*n >= 0); 488 assert (depth >= 0); 489 487 490 if (*n >= n_globs) 488 491 return FALSE; … … 496 499 int i; 497 500 498 globs[*n] = malloc ( depth* sizeof (char));501 globs[*n] = malloc ((depth + 1) * sizeof (char)); 499 502 for (i = 0; i < depth; i++) 500 503 globs[*n][depth - i - 1] = prefix[i];
Note:
See TracChangeset
for help on using the changeset viewer.