summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Gregory <andrew.gregory.8@gmail.com>2013-10-24 15:22:53 +0200
committerAllan McRae <allan@archlinux.org>2013-10-31 07:20:03 +0100
commit1c5b94e6bbcf2e8e1c8bb2711465b98a894a9652 (patch)
treee0ef2070a9efc18876a98e874724294bbf937e92
parentb82a0d83ce3aede3cd82885439996359fa7e7e7b (diff)
downloadpacman-1c5b94e6bbcf2e8e1c8bb2711465b98a894a9652.tar.gz
pacman-1c5b94e6bbcf2e8e1c8bb2711465b98a894a9652.tar.xz
callback.c: check for negative xfered size
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
-rw-r--r--src/pacman/callback.c2
1 files changed, 1 insertions, 1 deletions
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;
}