summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/contrib/strutl.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/apt-pkg/contrib/strutl.cc b/apt-pkg/contrib/strutl.cc
index ebde6b20d..26e303263 100644
--- a/apt-pkg/contrib/strutl.cc
+++ b/apt-pkg/contrib/strutl.cc
@@ -1090,10 +1090,11 @@ bool Base256ToNum(const char *Str,unsigned long long &Res,unsigned int Len)
tar files */
bool Base256ToNum(const char *Str,unsigned long &Res,unsigned int Len)
{
- unsigned long long Num;
+ unsigned long long Num = 0;
bool rc;
rc = Base256ToNum(Str, Num, Len);
+ // rudimentary check for overflow (Res = ulong, Num = ulonglong)
Res = Num;
if (Res != Num)
return false;