Radish alpha
H
HardenedBSD Package Manager
Radicle
Git (anonymous pull)
Log in to clone via SSH
Fix an illegal memory read (out-of-bound).
jlaffaye committed 15 years ago
commit 571b16dedf7998946efc483cfd6db57253729fe9
parent 609192ce21ba76a61cd3430ee9975ada0c1f15dc
1 file changed +5 -2
modified libpkg/pkg_manifest.c
@@ -232,8 +232,11 @@ pkg_parse_manifest(struct pkg *pkg, char *buf)
				break;
			}
		}
-
		buf_ptr += next + 1;
-
		next = strlen(buf_ptr);
+
		/* We need to compute `next' only if we are not at the end of the manifest */
+
		if (i != nbl) {
+
			buf_ptr += next + 1;
+
			next = strlen(buf_ptr);
+
		}
	}

	return (0);