Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP1:GA
libplist.4095
0004-Make-sure-to-compare-the-node-sizes-for-in...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0004-Make-sure-to-compare-the-node-sizes-for-integer-nodes.patch of Package libplist.4095
From acd226d1f71a78dd23b47a9a5c4ca8cf8068d509 Mon Sep 17 00:00:00 2001 From: Nikias Bassen <nikias@gmx.li> Date: Wed, 29 Jun 2016 03:48:14 +0200 Subject: [PATCH] plist_data_compare: Make sure to compare the node sizes for integer nodes Without this check, e.g. the values -1 and 18446744073709551615 would yield in a match, since the comparison will just compare the uint64_t values. However, any value >= 9223372036854775808 and <= 18446744073709551615 is stored as a 128 bit value in binary plist format to make sure it is recognized as an unsigned value. We store it internally as a uint64_t value, but we set the size to 16 vs. 8 accordingly; so this commit will make sure the binary plist optimization will not re-use matching uint64_t values of actually mismatching signed/unsigned values. --- src/plist.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/plist.c b/src/plist.c index 1ff17fc..d20a252 100644 --- a/src/plist.c +++ b/src/plist.c @@ -701,6 +701,8 @@ int plist_data_compare(const void *a, const void *b) case PLIST_UINT: case PLIST_REAL: case PLIST_UID: + if (val_a->length != val_b->length) + return FALSE; if (val_a->intval == val_b->intval) //it is an union so this is sufficient return TRUE; else
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor