[Pcsclite-cvs-commit] Drivers/ccid/src commands.c,1.24,1.25

rousseau@haydn.debian.org rousseau@haydn.debian.org


Update of /cvsroot/pcsclite/Drivers/ccid/src
In directory haydn:/tmp/cvs-serv13886/src

Modified Files:
	commands.c 
Log Message:
BUG: CmdPowerOn(): use memmove() instead of memcpy() to copy the ATR
bytes since the source end destination buffers (with a more than 10
bytes long ATR) overlaps.

Bug spotted by splint http://www.splint.org/


Index: commands.c
===================================================================
RCS file: /cvsroot/pcsclite/Drivers/ccid/src/commands.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- commands.c	15 Jul 2004 14:08:52 -0000	1.24
+++ commands.c	16 Jul 2004 06:31:15 -0000	1.25
@@ -142,7 +142,7 @@
 	else
 		*nlength = atr_len;
 
-	memcpy(buffer, buffer+10, atr_len);
+	memmove(buffer, buffer+10, atr_len);
 
 	return return_value;
 } /* CmdPowerOn */