pidgin: a2c12a00: Valgrind pointed out that dest and src m...

qulogic at pidgin.im qulogic at pidgin.im
Fri May 21 18:04:49 EDT 2010


-----------------------------------------------------------------
Revision: a2c12a00c9cb8be73b0ad117002086193a29b8f6
Ancestor: 99b486b95f984e7c70aaf8959168ecf0c6f56bea
Author: qulogic at pidgin.im
Date: 2010-05-05T09:07:10
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/a2c12a00c9cb8be73b0ad117002086193a29b8f6

Modified files:
        libpurple/protocols/msn/directconn.c

ChangeLog: 

Valgrind pointed out that dest and src may overlap, so we need to use
g_memmove here instead of memcpy.

-------------- next part --------------
============================================================
--- libpurple/protocols/msn/directconn.c	837c8c1040236c259504b5eb30982bee2e4273a9
+++ libpurple/protocols/msn/directconn.c	8ec50989454c2d96ecde88963b861c37e4c6f8de
@@ -710,7 +710,7 @@ msn_dc_recv_cb(gpointer data, gint fd, P
 		}
 
 		if (dc->in_pos > packet_length + 4) {
-			memcpy(dc->in_buffer, dc->in_buffer + 4 + packet_length, dc->in_pos - packet_length - 4);
+			g_memmove(dc->in_buffer, dc->in_buffer + 4 + packet_length, dc->in_pos - packet_length - 4);
 		}
 
 		dc->in_pos -= packet_length + 4;


More information about the Commits mailing list