From c9382f08d1fec4951b9acea9345ddd64cd619d56 Mon Sep 17 00:00:00 2001 From: Nicolás Alvarez Date: Sun, 16 Sep 2012 21:22:39 +0200 Subject: plist_data_compare: for PLIST_DATA, compare length before accessing data --- src/plist.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/plist.c b/src/plist.c index ee79cf4..dcaf601 100644 --- a/src/plist.c +++ b/src/plist.c @@ -650,6 +650,8 @@ int plist_data_compare(const void *a, const void *b) return FALSE; case PLIST_DATA: + if (val_a->length != val_b->length) + return FALSE; if (!memcmp(val_a->buff, val_b->buff, val_a->length)) return TRUE; else -- cgit v1.1-32-gdbae