OSDN Git Service
(root)
/
android-x86
/
external-libdrm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
899da0f
)
modetest: Fix segmentation fault
author
Ezequiel Garcia
<ezequiel@collabora.com>
Mon, 22 Jul 2019 16:08:22 +0000
(13:08 -0300)
committer
Emil Velikov
<emil.l.velikov@gmail.com>
Tue, 21 Jan 2020 17:56:23 +0000
(17:56 +0000)
When a mode is set with just a connector "-s foo",
we get a nasty segmentation fault. Fix it.
Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
tests/modetest/modetest.c
patch
|
blob
|
history
diff --git
a/tests/modetest/modetest.c
b/tests/modetest/modetest.c
index
2443697
..
09fd565
100644
(file)
--- a/
tests/modetest/modetest.c
+++ b/
tests/modetest/modetest.c
@@
-1721,6
+1721,8
@@
static int parse_connector(struct pipe_arg *pipe, const char *arg)
return -1;
/* Parse the remaining parameters. */
+ if (!endp)
+ return -1;
if (*endp == '@') {
arg = endp + 1;
pipe->crtc_id = strtoul(arg, &endp, 10);