From 4c9412cd866d95e98b09a2673baf6b6fd110fdb9 Mon Sep 17 00:00:00 2001 From: tezcatli Date: Thu, 12 Jan 2017 20:43:23 -0800 Subject: [PATCH] Change the IOGetVirtMem return value test to == -1 instead of < 0 which may include valid addresses --- src/video/imx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/video/imx.c b/src/video/imx.c index 2cf4daa..1dafbc9 100644 --- a/src/video/imx.c +++ b/src/video/imx.c @@ -116,7 +116,7 @@ static void decoder_renderer_setup(int videoFormat, int width, int height, int r exit(EXIT_FAILURE); } - if (IOGetVirtMem(&mem_desc) <= 0) { + if (IOGetVirtMem(&mem_desc) == -1) { fprintf(stderr, "Can't get virtual memory address\n"); exit(EXIT_FAILURE); }