Browse Source

ckdb - breakdown() allow zero length string values

master
kanoi 10 years ago
parent
commit
73cc2eb405
  1. 12
      src/ckdb.c
  2. 2
      src/ckdb.h

12
src/ckdb.c

@ -1363,18 +1363,6 @@ static enum cmd_values breakdown(K_TREE **trf_root, K_STORE **trf_store,
K_WUNLOCK(transfer_free); K_WUNLOCK(transfer_free);
return CMD_REPLY; return CMD_REPLY;
} }
if (end <= next+1) {
LOGERR("JSON '%s' zero length value "
"was: %.32s...",
transfer->name,
tmp = safe_text(was));
free(tmp);
free(cmdptr);
K_WLOCK(transfer_free);
k_add_head(transfer_free, item);
K_WUNLOCK(transfer_free);
return CMD_REPLY;
}
siz = end - next; siz = end - next;
end++; end++;
} else if (*next == JSON_ARRAY) { } else if (*next == JSON_ARRAY) {

2
src/ckdb.h

@ -52,7 +52,7 @@
#define DB_VLOCK "1" #define DB_VLOCK "1"
#define DB_VERSION "0.9.6" #define DB_VERSION "0.9.6"
#define CKDB_VERSION DB_VERSION"-0.901" #define CKDB_VERSION DB_VERSION"-0.902"
#define WHERE_FFL " - from %s %s() line %d" #define WHERE_FFL " - from %s %s() line %d"
#define WHERE_FFL_HERE __FILE__, __func__, __LINE__ #define WHERE_FFL_HERE __FILE__, __func__, __LINE__

Loading…
Cancel
Save