Radish alpha
H
HardenedBSD Package Manager
Radicle
Git (anonymous pull)
Log in to clone via SSH
Fix a UBSan warning
Alex Richardson committed 5 years ago
commit a0dbb79b938b0c479ef81f99465a0e7a8629913e
parent ce7cca15a1fbd560ecf0b8ec265b8d45872f9791
1 file changed +2 -1
modified libpkg/xstring.h
@@ -31,7 +31,8 @@ xstring_new(void)
static inline void
xstring_reset(xstring *str)
{
-
	memset(str->buf, 0, str->size);
+
	if (str->buf)
+
		memset(str->buf, 0, str->size);
	rewind(str->fp);

}