projects
/
citadel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fa222fc
)
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>
Sat, 28 Sep 2013 16:48:36 +0000
(18:48 +0200)
citadel/database.c
patch
|
blob
|
history
diff --git
a/citadel/database.c
b/citadel/database.c
index 23e7133516c3926697a4bda48a17fe9c0d0c2799..bb6505aec0d539c4cd74fdc88497531ee79f9641 100644
(file)
--- 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));