From add842257d29bb30a9853d29dcbd1a27fbb643c2 Mon Sep 17 00:00:00 2001 From: Cedric BAIL Date: Thu, 4 Oct 2012 01:46:03 +0000 Subject: [PATCH] eio: Fix possible memory corruption in eio_eet_data_read_cipher() Patch by Daniel Willmann SVN revision: 77392 --- legacy/eio/AUTHORS | 1 + legacy/eio/ChangeLog | 4 ++++ legacy/eio/NEWS | 1 + legacy/eio/src/lib/eio_eet.c | 2 +- 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/legacy/eio/AUTHORS b/legacy/eio/AUTHORS index 27d6bd6685..27aeadc3bf 100644 --- a/legacy/eio/AUTHORS +++ b/legacy/eio/AUTHORS @@ -5,3 +5,4 @@ Vincent "caro" Torri Mikael SANS Mike Blumenkrantz (zmike/discomfitor) Jérôme Pinot +Daniel Willmann diff --git a/legacy/eio/ChangeLog b/legacy/eio/ChangeLog index 2b8065c2ff..bc42978fe3 100644 --- a/legacy/eio/ChangeLog +++ b/legacy/eio/ChangeLog @@ -51,3 +51,7 @@ 2012-09-27 Cedric Bail * Don't stop on limited access right. + +2012-10-03 Daniel Willmann + * Fix memory corruption by allocating enough memory in + eio_eet_data_read_cipher(). diff --git a/legacy/eio/NEWS b/legacy/eio/NEWS index a841aae806..1fddc650e1 100644 --- a/legacy/eio/NEWS +++ b/legacy/eio/NEWS @@ -9,6 +9,7 @@ Fixes: - fix monitor shutdown when mainloop did never run. - fix build with xattr and without splice. - don't stop on limited access right. + - Fix memory corruption by allocating enough memory in eio_eet_data_read_cipher(). Improvements: diff --git a/legacy/eio/src/lib/eio_eet.c b/legacy/eio/src/lib/eio_eet.c index 36cf114f1b..049c1e39a9 100644 --- a/legacy/eio/src/lib/eio_eet.c +++ b/legacy/eio/src/lib/eio_eet.c @@ -458,7 +458,7 @@ eio_eet_data_read_cipher(Eet_File *ef, EINA_SAFETY_ON_NULL_RETURN_VAL(done_cb, NULL); EINA_SAFETY_ON_NULL_RETURN_VAL(error_cb, NULL); - er = malloc(sizeof (er)); + er = malloc(sizeof (Eio_Eet_Read)); EINA_SAFETY_ON_NULL_RETURN_VAL(er, NULL); er->ef = ef;