Radish alpha
H
HardenedBSD Package Manager
Radicle
Git (anonymous pull)
Log in to clone via SSH
directly use the new variable to compare with sizeof
Baptiste Daroussin committed 13 years ago
commit 5953df2d5a54be3aa34cf8da9de3d0a8ec73c3dd
parent c42ca2c77b8d615cfcf0b99a373180c55c6e8b59
1 file changed +1 -1
modified libpkg/fetch.c
@@ -336,7 +336,7 @@ pkg_fetch_file_to_fd(struct pkg_fetch *f, const char *url, int dest, time_t *t)
		} else {
			kevent(kq, &e, 1, &ev, 1, NULL);
			size_t size = (size_t)ev.data;
-
			if ((size_t)ev.data > sizeof(buf))
+
			if (size > sizeof(buf))
				size = sizeof(buf);
			if ((r = fread(buf, 1, size, remote)) < 1)
				break;