diff options
author | Nicolás Alvarez | 2012-09-16 21:22:39 +0200 |
---|---|---|
committer | Nikias Bassen | 2012-09-16 21:22:39 +0200 |
commit | c9382f08d1fec4951b9acea9345ddd64cd619d56 (patch) | |
tree | 8ee8ad13e1c84fd3a25bf9db1c7eddba30c4b0f2 /src/plist.c | |
parent | 502d52a3232bfc66a56acfc67e17f9d836b6cb67 (diff) | |
download | libplist-c9382f08d1fec4951b9acea9345ddd64cd619d56.tar.gz libplist-c9382f08d1fec4951b9acea9345ddd64cd619d56.tar.bz2 |
plist_data_compare: for PLIST_DATA, compare length before accessing data
Diffstat (limited to 'src/plist.c')
-rw-r--r-- | src/plist.c | 2 |
1 files changed, 2 insertions, 0 deletions
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 |