segv in lstrcpynA with --debugmsg +all

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This shoud fix a segv in lstrcpynA with --debugmsg +all. The problem
is that n is the max length of the destination and says nothing about
the source strings length.

MVH Tommy.

Index: memory/string.c
===================================================================
RCS file: /home/wine/wine/memory/string.c,v
retrieving revision 1.41
diff -u -r1.41 string.c
--- memory/string.c	10 Mar 2002 00:18:34 -0000	1.41
+++ memory/string.c	8 Jul 2002 13:23:20 -0000
@@ -240,7 +240,7 @@
 LPSTR WINAPI lstrcpynA( LPSTR dst, LPCSTR src, INT n )
 {
     LPSTR p = dst;
-    TRACE("(%p, %s, %i)\n", dst, debugstr_an(src,n), n);
+    TRACE("(%p, %s, %i)\n", dst, debugstr_an(src,strlen(src)), n);
     /* In real windows the whole function is protected by an exception handler
      * that returns ERROR_INVALID_PARAMETER on faulty parameters
      * We currently just check for NULL.

[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux