[Wine-patches] [eterhack 1/6] ntoskrnl.exe: Return error if buffer is too small.
Alexander Morozov
=?iso-8859-1?q?amorozov_=CE=C1_etersoft=2Eru?=
Ср Май 20 13:01:20 MSD 2009
----------- следующая часть -----------
From b2f5466a64c8cd850457edb84f50067b78bf0ea5 Mon Sep 17 00:00:00 2001
From: Alexander Morozov <amorozov на etersoft.ru>
Date: Tue, 5 May 2009 13:05:38 +0400
Subject: [eterhack 1/6] ntoskrnl.exe: Return error if buffer is too small.
---
dlls/ntoskrnl.exe/ntoskrnl.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c
index fd371bf..b400d25 100644
--- a/dlls/ntoskrnl.exe/ntoskrnl.c
+++ b/dlls/ntoskrnl.exe/ntoskrnl.c
@@ -1754,6 +1754,7 @@ NTSTATUS WINAPI IoGetDeviceProperty( PDEVICE_OBJECT DeviceObject,
}
SERVER_END_REQ;
+ if (status != STATUS_SUCCESS) break;
*ResultLength = len + sizeof(deviceW);
if (BufferLength >= *ResultLength)
{
@@ -1761,6 +1762,7 @@ NTSTATUS WINAPI IoGetDeviceProperty( PDEVICE_OBJECT DeviceObject,
device_name[len / sizeof(WCHAR)] = 0;
strcatW( PropertyBuffer, device_name );
}
+ else status = STATUS_BUFFER_TOO_SMALL;
break;
}
default:
--
1.6.2.5
Подробная информация о списке рассылки Wine-patches