Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Fix uninitialized memory in strchrnul fallback
Alex Richardson committed 5 years ago
commit fef68f87616fd30f018d621b9df89f8aa6aaf19f
parent 594ddab
1 file changed +3 -2
modified external/libfetch/common.c
@@ -273,9 +273,10 @@ fetch_resolve(const char *addr, int port, int af)
	} else {
		hb = addr;
#if HAVE_STRCHRNUL
-
    sep = strchrnul(hb, ':');
+
		sep = strchrnul(hb, ':');
#else
-
    do{ sep++; }while( *sep && *sep != ':' );
+
		sep = hb;
+
		do { sep++; } while (*sep && *sep != ':');
#endif
		he = sep;
	}