File emptypw.diff of Package rpm

--- lib/rpmug.c.orig	2025-04-25 09:48:27.153273090 +0000
+++ lib/rpmug.c	2025-04-25 09:50:00.113122450 +0000
@@ -1,6 +1,7 @@
 #include "system.h"
 
 #include <errno.h>
+#include <rpm/argv.h>
 #include <rpm/rpmlog.h>
 #include <rpm/rpmstring.h>
 #include <rpm/rpmmacro.h>
@@ -62,12 +63,11 @@ static int lookup_field(const char *path
     while ((str = fgets(buf, sizeof(buf), f)) != NULL) {
 	int nf = vcol > rcol ? vcol : rcol;
 	const char *fields[nf + 1];
-	char *tok, *save = NULL;
 	int col = -1;
 
-	while ((tok = strtok_r(str, ":", &save)) != NULL) {
-	    fields[++col] = tok;
-	    str = NULL;
+	ARGV_t tokens = argvSplitString(str, ":", ARGV_NONE);
+	for (ARGV_const_t tok = tokens; tok && *tok; tok++) {
+	    fields[++col] = *tok;
 	    if (col >= nf)
 		break;
 	}
@@ -78,6 +78,7 @@ static int lookup_field(const char *path
 		rc = 0;
 	    }
 	}
+	argvFree(tokens);
     }
 
     fclose(f);
openSUSE Build Service is sponsored by