X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3a5bcc4db0851bf8cd3063917511b0b17c7f9679..f1e7793361bb0106611e5d1373b4e1e6ed30f14f:/src/common/xpmdecod.cpp diff --git a/src/common/xpmdecod.cpp b/src/common/xpmdecod.cpp index 358131f241..f8524971a0 100644 --- a/src/common/xpmdecod.cpp +++ b/src/common/xpmdecod.cpp @@ -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); } /*