comparison libpurple/protocols/msn/directconn.c @ 30054:531fe008410e

Valgrind pointed out that dest and src may overlap, so we need to use g_memmove here instead of memcpy.
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Wed, 05 May 2010 09:07:10 +0000
parents 56871d6c06fc
children f0de96a35877
comparison
equal deleted inserted replaced
30053:56871d6c06fc 30054:531fe008410e
708 return; 708 return;
709 709
710 } 710 }
711 711
712 if (dc->in_pos > packet_length + 4) { 712 if (dc->in_pos > packet_length + 4) {
713 memcpy(dc->in_buffer, dc->in_buffer + 4 + packet_length, dc->in_pos - packet_length - 4); 713 g_memmove(dc->in_buffer, dc->in_buffer + 4 + packet_length, dc->in_pos - packet_length - 4);
714 } 714 }
715 715
716 dc->in_pos -= packet_length + 4; 716 dc->in_pos -= packet_length + 4;
717 } 717 }
718 } 718 }