dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH libdrm 1/2] modetest: Fix segmentation fault
@ 2019-07-22 16:08 Ezequiel Garcia
  2019-07-22 16:08 ` [PATCH libdrm 2/2] modetest: Add a new "-r" option to set a default mode Ezequiel Garcia
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Ezequiel Garcia @ 2019-07-22 16:08 UTC (permalink / raw)
  To: dri-devel; +Cc: Ezequiel Garcia, rohan.garg, Emil Velikov

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>
---
 tests/modetest/modetest.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tests/modetest/modetest.c b/tests/modetest/modetest.c
index e66be6607e00..5e628127a130 100644
--- a/tests/modetest/modetest.c
+++ b/tests/modetest/modetest.c
@@ -1695,6 +1695,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);
-- 
2.22.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-01-21 18:29 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-22 16:08 [PATCH libdrm 1/2] modetest: Fix segmentation fault Ezequiel Garcia
2019-07-22 16:08 ` [PATCH libdrm 2/2] modetest: Add a new "-r" option to set a default mode Ezequiel Garcia
2019-07-24 10:43   ` Rohan Garg
2020-01-21 18:30   ` Emil Velikov
2019-08-15 12:07 ` [PATCH libdrm 1/2] modetest: Fix segmentation fault Ezequiel Garcia
2019-09-18 22:08   ` Ezequiel Garcia
2020-01-20 18:35 ` Ezequiel Garcia

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox