From ed78f77ec9b3bb98f05aa43d16545846850774e2 Mon Sep 17 00:00:00 2001 From: Herman Semenov Date: Sun, 11 May 2025 15:59:02 +0300 Subject: apt-pkg: fixed type comparison in 64bit systems using memsize cast --- apt-pkg/tagfile.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'apt-pkg/tagfile.cc') diff --git a/apt-pkg/tagfile.cc b/apt-pkg/tagfile.cc index 26bf70804..fbc9cfb83 100644 --- a/apt-pkg/tagfile.cc +++ b/apt-pkg/tagfile.cc @@ -767,7 +767,7 @@ signed int pkgTagSection::FindIInternal(unsigned int Pos,signed long Default) co // Copy it into a temp buffer so we can use strtol char S[300]; - if ((unsigned)(Stop - Start) >= sizeof(S)) + if ((size_t)(Stop - Start) >= sizeof(S)) return Default; strncpy(S,Start,Stop-Start); S[Stop - Start] = 0; @@ -809,7 +809,7 @@ unsigned long long pkgTagSection::FindULLInternal(unsigned int Pos, unsigned lon // Copy it into a temp buffer so we can use strtoull char S[100]; - if ((unsigned)(Stop - Start) >= sizeof(S)) + if ((size_t)(Stop - Start) >= sizeof(S)) return Default; strncpy(S,Start,Stop-Start); S[Stop - Start] = 0; -- cgit v1.2.3-70-g09d2