From eaa43f8cbd863daeee7709710bbfb00bde52bd7d Mon Sep 17 00:00:00 2001 From: Mike McLean 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