From: Ivan Maidanski Date: Mon, 29 Feb 2016 21:41:39 +0000 (+0300) Subject: Fix unchecked pointer dereference in check_ints (gctest) X-Git-Tag: gc7_4_4~23 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fa95d3c9b6d1e814b217df475cb0a5bedb8a01e8;p=gc Fix unchecked pointer dereference in check_ints (gctest) * tests/test.c (check_ints): Fail (with the appropriate message) if "list" argument is nil. --- diff --git a/tests/test.c b/tests/test.c index c1a7da39..5b8bacd0 100644 --- a/tests/test.c +++ b/tests/test.c @@ -412,6 +412,10 @@ sexpr uncollectable_ints(int low, int up) void check_ints(sexpr list, int low, int up) { + if (is_nil(list)) { + GC_printf("list is nil\n"); + FAIL; + } if (SEXPR_TO_INT(car(car(list))) != low) { GC_printf( "List reversal produced incorrect list - collector is broken\n");