[ros-kernel] NtGdiExtTextOut patch for review

Jason Filby jasonfilby at yahoo.com
Sun May 30 03:32:00 CEST 2004


Hi all

If anyone wants to review this patch (actually a diff) please go ahead. 
This fixes a bug observed with NSIS 2.0 Beta 3a when testing executable 
from the InstallOptions.nsi script.

The incoming Count is zero and ends with the kernel crashing (!) 
because PagedPool of zero is requested for allocation (should this 
crash the kernel??). I would think that any text its copying from 
should be NULL terminated anyway, and the +1 seems to do the trick.

Thanks
Jason

1509c1509
<       Dx = ExAllocatePoolWithTag(PagedPool, Count * sizeof(INT), 
TAG_GDITEXT);

---
 >       Dx = ExAllocatePoolWithTag(PagedPool, (Count+1) * sizeof(INT), 
TAG_GDITE
XT);
1516c1516
<       Status = MmCopyFromCaller(Dx, UnsafeDx, Count * sizeof(INT));
---
 >       Status = MmCopyFromCaller(Dx, UnsafeDx, (Count+1) * sizeof(INT));


	
		
__________________________________
Do you Yahoo!?
Friends.  Fun.  Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/ 


More information about the Ros-kernel mailing list