blob: 72e450a4876fa4fc602972b06576281b8cf9cf13 [file] [log] [blame] [raw]
Fix null pointer dereferencing.
diff -ru --exclude-from freebsd-src-diff-exclude-names /var/tmp/freebsd-10.3-src/usr/src/sys/libkern/iconv_xlat16.c freebsd-10.3/usr/src/sys/libkern/iconv_xlat16.c
--- /var/tmp/freebsd-10.3-src/usr/src/sys/libkern/iconv_xlat16.c 2016-03-25 09:09:51.000000000 +0800
+++ freebsd-10.3/usr/src/sys/libkern/iconv_xlat16.c 2019-04-05 19:59:07.312577430 +0800
@@ -190,6 +190,10 @@
}
}
+ if(!dp->d_table[c1]) {
+ ret = -1;
+ break;
+ }
code = dp->d_table[c1][c2];
if (!code) {
ret = -1;