mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-08 14:58:06 +02:00
test: Fix handling of dots in CAIRO_TEST_TARGET
Before this, the following happened: $ CAIRO_TEST_TARGET=image,xcb-render-0.0 make test Cannot find target 'image'. Known targets: image, [...] The reason for this is that _cairo_boilerplate_target_matches_name() doesn't get a null-terminated string, but instead has a pointer to the end of the string. However, strpbrk() expects a null-terminated argument and thus could return a result which points past the end of the input. This commit fixes exactly this. Reported-by: Darxus <darxus@chaosreigns.com> Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
13bd8d09b4
commit
caf50c07e2
1 changed files with 2 additions and 0 deletions
|
|
@ -514,6 +514,8 @@ _cairo_boilerplate_target_matches_name (const cairo_boilerplate_target_t *target
|
|||
size_t name_len;
|
||||
size_t content_len;
|
||||
|
||||
if (content_start >= end)
|
||||
content_start = NULL;
|
||||
if (content_start != NULL)
|
||||
end = content_start++;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue