Radish alpha
H
HardenedBSD Package Manager
Radicle
Git (anonymous pull)
Log in to clone via SSH
Fix uninitialized memory in strchrnul fallback
Alex Richardson committed 5 years ago
commit fef68f87616fd30f018d621b9df89f8aa6aaf19f
parent 594ddabe9ddda52383f6f6fa8a64456d3c4bad3f
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;
	}