From 022127a24d30b0dce9b640f93f49b3cc93cf12c4 Mon Sep 17 00:00:00 2001 From: Wilfried Goesgens Date: Sat, 28 Sep 2013 18:48:36 +0200 Subject: [PATCH] Make realy shure we don't put a NULL into memcpy --- citadel/database.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/citadel/database.c b/citadel/database.c index 23e713351..bb6505aec 100644 --- a/citadel/database.c +++ b/citadel/database.c @@ -908,7 +908,7 @@ time_t CheckIfAlreadySeen(const char *Facility, { SEENM_syslog(LOG_DEBUG, "Loading"); cdbut = cdb_fetch(CDB_USETABLE, SKEY(guid)); - if (cdbut != NULL) { + if ((cdbut != NULL) && (cdbut->ptr != NULL)) { memcpy(&ut, cdbut->ptr, ((cdbut->len > sizeof(struct UseTable)) ? sizeof(struct UseTable) : cdbut->len)); -- 2.30.2