Browse Source

ckdb - don't truncate text input

master
kanoi 8 years ago
parent
commit
9c9349371b
  1. 10
      src/ckdb.c
  2. 2
      src/ckdb.h

10
src/ckdb.c

@ -4178,8 +4178,14 @@ static enum cmd_values breakdown(K_ITEM **ml_item, char *buf, tv_t *now,
K_WUNLOCK(transfer_free);
DATA_TRANSFER(transfer, t_item);
STRNCPY(transfer->name, data);
STRNCPY(transfer->svalue, eq);
transfer->mvalue = transfer->svalue;
siz = strlen(eq) + 1;
if (siz > sizeof(transfer->svalue)) {
transfer->mvalue = malloc(siz);
STRNCPYSIZ(transfer->mvalue, eq, siz);
} else {
STRNCPYSIZ(transfer->svalue, eq, siz);
transfer->mvalue = transfer->svalue;
}
// Discard duplicates
if (find_in_ktree_nolock(msgline->trf_root, t_item, ctx)) {

2
src/ckdb.h

@ -58,7 +58,7 @@
#define DB_VLOCK "1"
#define DB_VERSION "1.0.7"
#define CKDB_VERSION DB_VERSION"-2.433"
#define CKDB_VERSION DB_VERSION"-2.435"
#define WHERE_FFL " - from %s %s() line %d"
#define WHERE_FFL_HERE __FILE__, __func__, __LINE__

Loading…
Cancel
Save