Page MenuHomeFreeBSD

D27671.diff
No OneTemporary

D27671.diff

diff --git a/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c b/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c
--- a/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c
+++ b/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c
@@ -6374,6 +6374,14 @@
uintptr_t s2 = regs[r2];
size_t lim1, lim2;
+ /*
+ * If one of the strings is NULL then the limit becomes
+ * 0 which compares 0 characters in dtrace_strncmp()
+ * resulting in a false positive. dtrace_strncmp()
+ * treats a NULL as an empty 1-char string.
+ */
+ lim1 = lim2 = 1;
+
if (s1 != 0 &&
!dtrace_strcanload(s1, sz, &lim1, mstate, vstate))
break;
diff --git a/sys/modules/dtrace/dtrace/Makefile b/sys/modules/dtrace/dtrace/Makefile
--- a/sys/modules/dtrace/dtrace/Makefile
+++ b/sys/modules/dtrace/dtrace/Makefile
@@ -61,6 +61,5 @@
CFLAGS.dtrace_asm.S+= -D_SYS_ERRNO_H_ -D_SYS_PARAM_H_ -DLOCORE
CWARNFLAGS+= ${OPENZFS_CWARNFLAGS}
CWARNFLAGS+= -Wno-parentheses
-CWARNFLAGS+= -Wno-uninitialized
CWARNFLAGS+= -Wno-cast-qual
CWARNFLAGS+= -Wno-unused

File Metadata

Mime Type
text/plain
Expires
Thu, Nov 7, 7:28 AM (22 h, 5 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14506828
Default Alt Text
D27671.diff (1 KB)

Event Timeline