Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F101993169
D27671.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D27671.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D27671: dtrace: Fix /"string" == NULL/ comparisons using an uninitialized value.
Attached
Detach File
Event Timeline
Log In to Comment