From: Nikos Mavrogiannopoulos Date: Mon, 27 Jan 2014 14:44:43 +0000 (+0100) Subject: correctly read the magic number and timestamp; report and patch by Jonathan Roudiere X-Git-Tag: gnutls_3_3_0pre0~245 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=97087fb84cd4e620d1fd232839d710bdb5216d83;p=thirdparty%2Fgnutls.git correctly read the magic number and timestamp; report and patch by Jonathan Roudiere --- diff --git a/lib/gnutls_db.c b/lib/gnutls_db.c index 2d9b744a72..faa158c09c 100644 --- a/lib/gnutls_db.c +++ b/lib/gnutls_db.c @@ -164,12 +164,12 @@ time_t gnutls_db_check_entry_time(gnutls_datum_t * entry) if (entry->size < 8) return gnutls_assert_val(0); - memcpy(&magic, entry->data, 4); + magic = _gnutls_read_uint32(entry->data); if (magic != PACKED_SESSION_MAGIC) return gnutls_assert_val(0); - memcpy(&t, &entry->data[4], 4); + t = _gnutls_read_uint32(&entry->data[4]); return t; }