You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
koji/koji-1.7.1-checkUpload.patch

31 lines
1.1 KiB

From eaa43f8cbd863daeee7709710bbfb00bde52bd7d Mon Sep 17 00:00:00 2001
From: Mike McLean <mikem@redhat.com>
Date: Thu, 17 Jan 2013 21:16:50 +0000
Subject: fix integer overflow issue in checkUpload handler
---
diff --git a/hub/kojihub.py b/hub/kojihub.py
index 003e1fc..b433169 100644
--- a/hub/kojihub.py
+++ b/hub/kojihub.py
@@ -7061,7 +7061,7 @@ class RootExports(object):
try:
fcntl.lockf(fd, fcntl.LOCK_SH|fcntl.LOCK_NB)
except IOError, e:
- koji.LockError, e
+ raise koji.LockError, e
st = os.fstat(fd)
if not stat.S_ISREG(st.st_mode):
raise koji.GenericError, "Not a regular file: %s" % fn
@@ -7081,7 +7081,7 @@ class RootExports(object):
length += len(chunk)
chksum.update(chunk)
chunk = os.read(fd, 8192)
- data['sumlength'] = length
+ data['sumlength'] = koji.encode_int(length)
data['hexdigest'] = chksum.hexdigest()
return data
finally:
--
cgit v0.9.1