diff --git a/Core/Memory/MemoryManager.cpp b/Core/Memory/MemoryManager.cpp index b76eb6f..3f643e4 100644 --- a/Core/Memory/MemoryManager.cpp +++ b/Core/Memory/MemoryManager.cpp @@ -60,7 +60,7 @@ namespace Memory else if (Whence == SEEK_CUR) { NewOffset = node->Offset + Offset; - if (NewOffset > node->Length || NewOffset < 0) + if ((size_t)NewOffset > node->Length || NewOffset < 0) return -1; node->Offset = NewOffset; } diff --git a/FileSystem/FS/ustar.cpp b/FileSystem/FS/ustar.cpp index 6adb5f2..b97e145 100644 --- a/FileSystem/FS/ustar.cpp +++ b/FileSystem/FS/ustar.cpp @@ -50,7 +50,7 @@ namespace VirtualFileSystem else if (Whence == SEEK_CUR) { NewOffset = node->Offset + Offset; - if (NewOffset > node->Length || NewOffset < 0) + if ((size_t)NewOffset > node->Length || NewOffset < 0) return -1; node->Offset = NewOffset; }