Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Add comment and observation on memory corruption.
Keve committed 1 year ago
commit 866ffc67bb81f1f5c665613cbbf381732e3579f5
parent 2b26ec2
1 file changed +7 -0
modified libpkg/utils.c
@@ -804,6 +804,13 @@ get_socketpair(int *pipe)
	return (r);
}

+
/*
+
 * Modify the passed C-String by stripping off the last component delimited by '/'.
+
 * Return the string. Return a constant "." when passed NULL or the empty string.
+
 * FIXME: This routine corrupts memory when passed the empty string.
+
 * FIXME: This routine should propagate NULL.
+
 * TODO: Refactor at call sites.
+
 */
char *
get_dirname(char *d)
{