[Pcsclite-cvs-commit] r2164 - trunk/PCSC/src

Ludovic Rousseau rousseau at costa.debian.org
Wed Sep 20 09:14:53 CEST 2006


Author: rousseau
Date: 2006-09-20 07:14:52 +0000 (Wed, 20 Sep 2006)
New Revision: 2164

Modified:
   trunk/PCSC/src/error.c
Log:
pcsc_stringify_error(): correct a off-by-one buffer overflow. Closes
#303836 "pcsc-lite-1.3.2: array subscript out of range"

Thanks to David Binderman for the bug report and patch.


Modified: trunk/PCSC/src/error.c
===================================================================
--- trunk/PCSC/src/error.c	2006-09-14 20:02:00 UTC (rev 2163)
+++ trunk/PCSC/src/error.c	2006-09-20 07:14:52 UTC (rev 2164)
@@ -165,7 +165,7 @@
 	};
 
 	/* add a null byte */
-	strError[sizeof(strError)] = '\0';
+	strError[sizeof(strError)-1] = '\0';
 
 	return strError;
 }




More information about the Pcsclite-cvs-commit mailing list