From 1c5b94e6bbcf2e8e1c8bb2711465b98a894a9652 Mon Sep 17 00:00:00 2001 From: Andrew Gregory Date: Thu, 24 Oct 2013 09:22:53 -0400 Subject: callback.c: check for negative xfered size Signed-off-by: Andrew Gregory Signed-off-by: Allan McRae --- src/pacman/callback.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/pacman/callback.c b/src/pacman/callback.c index d0b7c409..36531a26 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; } -- cgit v1.2.3-70-g09d2