[ros-kernel] String Display Error

Skywing skywing at valhallalegends.com
Wed Jan 28 15:35:56 CET 2004


While pages are zero filled by the zero page thread before they are passed
to processes via Nt/ZwAllocateVirtualMemory, you aren't guaranteed a zero
filled buffer if you use, say, the heap functions to allocate memory.  So, I
do not think there is some missing behavior in ReactOS.

-----Original Message-----
From: ros-kernel-bounces at reactos.com [mailto:ros-kernel-bounces at reactos.com]
On Behalf Of Nate DeSimone
Sent: Wednesday, January 28, 2004 2:20 PM
To: ReactOS Kernel List
Subject: Re: [ros-kernel] String Display Error

Actually there has been consistent behavior in the case of both 
platforms, I think the reason for this is because if I remember 
correctly all strings a zero terminated, so it really doesn't run past 
the end of the string, its just running past the useful part of it, so 
when Windows reads that zero it just puts a blank space but ReactOS puts 
a box.

>Zitat von Nate DeSimone <desimn at rpi.edu>:
>
>  
>
>>I figured out the problem.  It was in fact a bug in my code, when I was
>>combining two strings I actually went 1 character over the end of the
>>smaller string, due to having a <= instead of a < in my for loop's
>>condition, and I would never have even thought I looking more closely at
>>that had it not been for ReactOS, of course I'm sure that if I made that
>>mistake other people did too so it might be worthwhile to make ReactOS
>>behave like Windows when it encounters that error.
>>    
>>
>
>Hi,
>IMHO there is no normal behavior since the memory contents beyond the
string is
>purely random and also may not belong to the application itself. Thus the
>behavior cannot be forseen (from segementation violation to printing out
random
>characters)
>
>regards,
>
>--
>Johannes Anderwald
>
>_______________________________________________
>Ros-kernel mailing list
>Ros-kernel at reactos.com
>http://reactos.com/mailman/listinfo/ros-kernel
>
>
>  
>

_______________________________________________
Ros-kernel mailing list
Ros-kernel at reactos.com
http://reactos.com/mailman/listinfo/ros-kernel




More information about the Ros-kernel mailing list