Explorar el Código

memmove for overlapping mem copies.

Oswald Buddenhagen hace 19 años
padre
commit
617d1a6e49
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      src/drv_imap.c

+ 1 - 1
src/drv_imap.c

@@ -369,7 +369,7 @@ buffer_gets( buffer_t * b, char **s )
 				n = b->bytes - start;
 				n = b->bytes - start;
 
 
 				if (n)
 				if (n)
-					memcpy( b->buf, b->buf + start, n );
+					memmove( b->buf, b->buf + start, n );
 				b->offset -= start;
 				b->offset -= start;
 				b->bytes = n;
 				b->bytes = n;
 				start = 0;
 				start = 0;