diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/src/lookups/dbmdb.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/src/lookups/dbmdb.c b/src/src/lookups/dbmdb.c index edc49e581..32514afcc 100644 --- a/src/src/lookups/dbmdb.c +++ b/src/src/lookups/dbmdb.c @@ -94,8 +94,10 @@ EXIM_DATUM key, data; exim_datum_init(&key); /* Some DBM libraries require datums to */ exim_datum_init(&data); /* be cleared before use. */ -exim_datum_data_set(&key, string_copyn(keystring, length)); -exim_datum_size_set(&key, length + 1); +length++; +exim_datum_data_set(&key, + memcpy(store_get(length, keystring), keystring, length)); /* key can have embedded NUL */ +exim_datum_size_set(&key, length); if (exim_dbget(d, &key, &data)) { |