When I use Strlen in masm32.lib in following way in Win98,a error box will happen:

szBuf db 256 dup(?)
lea esi,szBuf
invoke Strlen,esi

but in Win 2000,no error will happen.

But why?:stupid:
Posted on 2002-09-28 05:58:05 by smallwaves
A error use is follow:

szBuf db 256 dup(?)

invoke StdOut,edi
Posted on 2002-09-28 06:02:42 by smallwaves
the string functions require a null character to indicate the end of the string. If there is no null character then the string function will read/write past the end of the buffer which will result in an access violation.
Posted on 2002-09-29 13:25:50 by MArtial_Code