From: Michael Tremer Date: Sun, 16 Feb 2025 13:40:55 +0000 (+0000) Subject: packages: Always check if the file size matches X-Git-Tag: 0.9.30~11 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0e3a18313c0f1b850edcdec6783a8fd3f7a999cc;p=pakfire.git packages: Always check if the file size matches Signed-off-by: Michael Tremer --- diff --git a/src/pakfire/package.c b/src/pakfire/package.c index 6c32be38..401e1883 100644 --- a/src/pakfire/package.c +++ b/src/pakfire/package.c @@ -1423,7 +1423,7 @@ int pakfire_package_is_available(struct pakfire_package* self) { ssize_t size = pakfire_package_get_num(self, PAKFIRE_PKG_DOWNLOADSIZE, 0); // Check if the size matches - this is quite a good test to see if we have the right file - if ((size > 0) && (st.st_size != size)) + if (st.st_size != size) return 0; // Yes, this seems to be available