Marcus Meissner : inetcomm: Avoid overlapping memcpy (Coverity).

Alexandre Julliard julliard at wine.codeweavers.com
Mon Apr 20 08:24:42 CDT 2015


Module: wine
Branch: master
Commit: a57b06c5acac1bed5a4aa632ab939ca5a1cd028d
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=a57b06c5acac1bed5a4aa632ab939ca5a1cd028d

Author: Marcus Meissner <marcus at jet.franken.de>
Date:   Sun Apr 19 11:50:42 2015 +0200

inetcomm: Avoid overlapping memcpy (Coverity).

---

 dlls/inetcomm/mimeole.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/inetcomm/mimeole.c b/dlls/inetcomm/mimeole.c
index 6a6cbd8..94fb558 100644
--- a/dlls/inetcomm/mimeole.c
+++ b/dlls/inetcomm/mimeole.c
@@ -1613,13 +1613,13 @@ static HRESULT create_body_offset_list(IStream *stm, const char *boundary, struc
 
         if(overlap == buf) /* 1st iteration */
         {
-            memcpy(buf, buf + PARSER_BUF_SIZE - overlap_no, overlap_no);
+            memmove(buf, buf + PARSER_BUF_SIZE - overlap_no, overlap_no);
             overlap = buf + overlap_no;
             start += read - overlap_no;
         }
         else
         {
-            memcpy(buf, buf + PARSER_BUF_SIZE, overlap_no);
+            memmove(buf, buf + PARSER_BUF_SIZE, overlap_no);
             start += read;
         }
     } while(1);




More information about the wine-cvs mailing list