Module Name:    src
Committed By:   christos
Date:           Sat Aug 24 22:30:27 UTC 2024

Modified Files:
        src/sys/lib/libkern: pmatch.c

Log Message:
Not really a bug since the value is not used, but avoid reading uninitialized
memory anyway (CID-1597959)


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/lib/libkern/pmatch.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/lib/libkern/pmatch.c
diff -u src/sys/lib/libkern/pmatch.c:1.7 src/sys/lib/libkern/pmatch.c:1.8
--- src/sys/lib/libkern/pmatch.c:1.7	Thu Jan 21 10:44:14 2021
+++ src/sys/lib/libkern/pmatch.c	Sat Aug 24 18:30:26 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmatch.c,v 1.7 2021/01/21 15:44:14 thorpej Exp $	*/
+/*	$NetBSD: pmatch.c,v 1.8 2024/08/24 22:30:26 christos Exp $	*/
 
 /*-
  * Copyright (c) 1980, 1991 The Regents of the University of California.
@@ -51,7 +51,7 @@ pmatch(const char *string, const char *p
 {
 	u_char stringc, patternc, rangec;
 	int match, negate_range;
-	const char *oestr, *pestr, *testr;
+	const char *oestr, *pestr, *testr = NULL;
 
 	if (estr == NULL)
 		estr = &testr;

Reply via email to