]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/xpmdecod.cpp
Make radiobutton tab behaviour the same on MSW
[wxWidgets.git] / src / common / xpmdecod.cpp
index 358131f241f007791e9f37f1ae8b7be32905fc12..f8524971a0e7e2f2d8b465c658a6b8537e507b79 100644 (file)
@@ -178,7 +178,10 @@ wxImage wxXPMDecoder::ReadFile(wxInputStream& stream)
             if ( (*q == '*') && (*(q + 1) == '/') )
                 break;
         }
-        strcpy(p, q + 2);
+        
+        // memmove allows overlaps (unlike strcpy):
+        size_t cpylen = strlen(q + 2) + 1;
+        memmove(p, q + 2, cpylen); 
     }
 
     /*