Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Fix another segfault in pipeevent
Baptiste Daroussin committed 12 years ago
commit 0e626d54c770d93d30f1c7b88f148425cd6ce4d0
parent 67b1152
1 file changed +1 -1
modified libpkg/pkg_event.c
@@ -41,7 +41,7 @@ static char *
sbuf_json_escape(struct sbuf *buf, const char *str)
{
	sbuf_clear(buf);
-
	while (*str != '\0') {
+
	while (str != NULL && *str != '\0') {
		if (*str == '"' || *str == '\\')
			sbuf_putc(buf, '\\');
		sbuf_putc(buf, *str);