From: Michael Tremer Date: Tue, 21 Jan 2025 17:33:08 +0000 (+0000) Subject: xfer: Ensure we are uploading from the beginning of the file X-Git-Tag: 0.9.30~403 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=79d8bee53060f63ffe226b884111aa8ffea019aa;p=pakfire.git xfer: Ensure we are uploading from the beginning of the file Signed-off-by: Michael Tremer --- diff --git a/src/pakfire/xfer.c b/src/pakfire/xfer.c index 7949731f..64a2828c 100644 --- a/src/pakfire/xfer.c +++ b/src/pakfire/xfer.c @@ -662,6 +662,11 @@ int pakfire_xfer_set_input(struct pakfire_xfer* xfer, FILE* f) { struct stat stat; int r; + // Read from the beginning + r = pakfire_rewind(f); + if (r < 0) + return r; + // Fetch the file descriptor const int fd = fileno(f);