blob: d15cd5e110a59185deeb8a46f0bfbf3595982a77 [file] [log] [blame] [raw]
Fix null pointer dereferencing.
diff -ru --exclude-from freebsd-src-diff-exclude-names /usr/src/sys/libkern/iconv_xlat16.c freebsd-11.1/usr/src/sys/libkern/iconv_xlat16.c
--- /usr/src/sys/libkern/iconv_xlat16.c 2017-07-21 07:42:05.000000000 +0800
+++ freebsd-11.1/usr/src/sys/libkern/iconv_xlat16.c 2019-04-06 10:26:41.354532000 +0800
@@ -190,6 +190,10 @@
}
}
+ if(!dp->d_table[c1]) {
+ ret = -1;
+ break;
+ }
code = dp->d_table[c1][c2];
if (!code) {
ret = -1;