[Zodb-checkins] CVS: Zope/lib/python/BTrees - _fsBTree.c:1.4.10.3

Tim Peters tim.one at comcast.net
Mon Jun 23 11:42:26 EDT 2003


Update of /cvs-repository/Zope/lib/python/BTrees
In directory cvs.zope.org:/tmp/cvs-serv22980/lib/python/BTrees

Modified Files:
      Tag: Zope-2_6-branch
	_fsBTree.c 
Log Message:
Backport from Zope2 HEAD:  TEST_VALUE should use memcmp instead of
strncmp; strncmp will erroneously "stop early" if there's an embedded
NUL byte.


=== Zope/lib/python/BTrees/_fsBTree.c 1.4.10.2 => 1.4.10.3 ===
--- Zope/lib/python/BTrees/_fsBTree.c:1.4.10.2	Thu Jan 30 18:25:09 2003
+++ Zope/lib/python/BTrees/_fsBTree.c	Mon Jun 23 10:42:25 2003
@@ -42,7 +42,7 @@
 #define VALUEMACROS_H "$Id$\n"
 #define VALUE_TYPE char6
 #undef VALUE_TYPE_IS_PYOBJECT
-#define TEST_VALUE(K, T) strncmp(K,T,6)
+#define TEST_VALUE(K, T) memcmp(K,T,6)
 #define DECLARE_VALUE(NAME) VALUE_TYPE NAME
 #define DECREF_VALUE(k)
 #define INCREF_VALUE(k)




More information about the Zodb-checkins mailing list