[Zodb-checkins] CVS: ZODB3/BTrees - _fsBTree.c:1.4.12.2

Tim Peters tim.one at comcast.net
Mon Jun 23 11:56:33 EDT 2003


Update of /cvs-repository/ZODB3/BTrees
In directory cvs.zope.org:/tmp/cvs-serv25263/BTrees

Modified Files:
      Tag: ZODB3-3_1-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.


=== ZODB3/BTrees/_fsBTree.c 1.4.12.1 => 1.4.12.2 ===
--- ZODB3/BTrees/_fsBTree.c:1.4.12.1	Wed Nov 13 11:34:28 2002
+++ ZODB3/BTrees/_fsBTree.c	Mon Jun 23 10:56:32 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