Ensure we retrieve int record from db using tcadbget instead of tcadbget2.
This could possibly fix the use of an invalid read/write reported by
Valgrind resulting in data corruption on the btree db files.
@@ -573,14 +573,14 @@ out:
static int
get_si32 (void *hash, const char *key)
{
- int ret = 0;
+ int ret = 0, sp;
void *ptr;
if (!hash)
return -1;
/* key found, return current value */
- if ((ptr = tcadbget2 (hash, key)) != NULL) {
+ if ((ptr = tcadbget (hash, key, strlen (key), &sp)) != NULL) {
ret = (*(int *) ptr);
free (ptr);
return ret;
