Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/external/bsd/sljit/dist/test_src CID 976986: NULL deref.
details: https://anonhg.NetBSD.org/src/rev/0e4ebbecdbf5
branches: trunk
changeset: 338042:0e4ebbecdbf5
user: christos <christos%NetBSD.org@localhost>
date: Sat May 09 13:16:42 2015 +0000
description:
CID 976986: NULL deref.
diffstat:
sys/external/bsd/sljit/dist/test_src/sljitTest.c | 19 +++++++++++++------
1 files changed, 13 insertions(+), 6 deletions(-)
diffs (33 lines):
diff -r 5731cf318291 -r 0e4ebbecdbf5 sys/external/bsd/sljit/dist/test_src/sljitTest.c
--- a/sys/external/bsd/sljit/dist/test_src/sljitTest.c Sat May 09 13:10:50 2015 +0000
+++ b/sys/external/bsd/sljit/dist/test_src/sljitTest.c Sat May 09 13:16:42 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sljitTest.c,v 1.5 2015/02/16 13:30:15 alnsn Exp $ */
+/* $NetBSD: sljitTest.c,v 1.6 2015/05/09 13:16:42 christos Exp $ */
/*
* Stack-less Just-In-Time compiler
@@ -65,11 +65,18 @@
}
#define CHECK(compiler) \
- if (sljit_get_compiler_error(compiler) != SLJIT_ERR_COMPILED) { \
- printf("Compiler error: %d\n", sljit_get_compiler_error(compiler)); \
- sljit_free_compiler(compiler); \
- return; \
- }
+ do { \
+ if (compiler == NULL) { \
+ printf("Can't create compiler\n"); \
+ return; \
+ } \
+ if (sljit_get_compiler_error(compiler) != SLJIT_ERR_COMPILED) { \
+ printf("Compiler error: %d\n", \
+ sljit_get_compiler_error(compiler)); \
+ sljit_free_compiler(compiler); \
+ return; \
+ } \
+ } while (/*CONSTCOND*/0)
static void cond_set(struct sljit_compiler *compiler, sljit_si dst, sljit_sw dstw, sljit_si type)
{
Home |
Main Index |
Thread Index |
Old Index