[pacman-dev] [PATCH] callback.c: check for negative xfered size

Andrew Gregory andrew.gregory.8 at gmail.com
Thu Oct 24 09:22:53 EDT 2013


Signed-off-by: Andrew Gregory <andrew.gregory.8 at gmail.com>
---
 src/pacman/callback.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/pacman/callback.c b/src/pacman/callback.c
index d0b7c40..36531a2 100644
--- a/src/pacman/callback.c
+++ b/src/pacman/callback.c
@@ -632,7 +632,7 @@ void cb_dl_progress(const char *filename, off_t file_xfered, off_t file_total)
 	}
 
 	/* bogus values : stop here */
-	if(xfered > total) {
+	if(xfered > total || xfered < 0) {
 		return;
 	}
 
-- 
1.8.4.1



More information about the pacman-dev mailing list