projects
/
citadel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
36f3805
)
Make realy shure we don't put a NULL into memcpy
author
Wilfried Goesgens
<dothebart@citadel.org>
Sat, 28 Sep 2013 16:48:36 +0000
(18:48 +0200)
committer
Wilfried Goesgens
<dothebart@citadel.org>
Mon, 7 Oct 2013 19:33:11 +0000
(21:33 +0200)
citadel/database.c
patch
|
blob
|
history
diff --git
a/citadel/database.c
b/citadel/database.c
index b3a67d69b36368ecab49944c149314ea7efdea57..d9080a5d716c58f39817de085cd77a217c2c213b 100644
(file)
--- a/
citadel/database.c
+++ b/
citadel/database.c
@@
-931,7
+931,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));