segv in lstrcpynA with --debugmsg +all

Francois Gouget fgouget at free.fr
Mon Jul 8 12:42:37 CDT 2002


On 8 Jul 2002, Tommy Schultz Lassen wrote:

> 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.

Seems like the following would be better:


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_a(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.



--
Francois Gouget         fgouget at free.fr        http://fgouget.free.fr/
                         "Utilisateur" (nom commun) :
        Mot utilisé par les informaticiens en lieu et place d'"idiot".




More information about the wine-patches mailing list