[pkg-wine-party] [SCM] Debian Wine packaging branch, lenny, updated. wine-1.0.0-1-126-gccc5cbd
Alexandre Julliard
julliard at winehq.org
Thu Oct 30 14:43:45 UTC 2008
The following commit has been merged in the lenny branch:
commit c1a8456d426673a88cee47b5ac0dbaf25302295c
Author: Alexandre Julliard <julliard at winehq.org>
Date: Mon Jun 30 12:51:35 2008 +0200
ntdll: Add some sanity checks for invalid relocation blocks.
(cherry picked from commit 8e5f28127644344247056337a4eeca71f0e43322)
diff --git a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c
index f14085d..ef97eb2 100644
--- a/dlls/ntdll/virtual.c
+++ b/dlls/ntdll/virtual.c
@@ -1107,8 +1107,14 @@ static NTSTATUS map_image( HANDLE hmapping, int fd, char *base, SIZE_T total_siz
rel = (IMAGE_BASE_RELOCATION *)(ptr + relocs->VirtualAddress);
end = (IMAGE_BASE_RELOCATION *)(ptr + relocs->VirtualAddress + relocs->Size);
- while (rel < end && rel->SizeOfBlock)
+ while (rel <= end - 1 && rel->SizeOfBlock)
{
+ if (rel->VirtualAddress >= total_size)
+ {
+ WARN_(module)( "invalid address %p in relocation %p\n", ptr + rel->VirtualAddress, rel );
+ status = STATUS_ACCESS_VIOLATION;
+ goto error;
+ }
rel = LdrProcessRelocationBlock( ptr + rel->VirtualAddress,
(rel->SizeOfBlock - sizeof(*rel)) / sizeof(USHORT),
(USHORT *)(rel + 1), delta );
--
Debian Wine packaging
More information about the pkg-wine-party
mailing list