/[packages]/updates/5/libplist/current/SOURCES/0004-Make-sure-to-compare-the-node-sizes-for-integer-nodes.patch
ViewVC logotype

Contents of /updates/5/libplist/current/SOURCES/0004-Make-sure-to-compare-the-node-sizes-for-integer-nodes.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1186922 - (show annotations) (download)
Fri Dec 29 04:22:08 2017 UTC (6 years, 3 months ago) by luigiwalser
File size: 1295 byte(s)
- 1.12
- library major is now 3
- add patches from opensuse to fix several security issues (mga#20232)

1 From acd226d1f71a78dd23b47a9a5c4ca8cf8068d509 Mon Sep 17 00:00:00 2001
2 From: Nikias Bassen <nikias@gmx.li>
3 Date: Wed, 29 Jun 2016 03:48:14 +0200
4 Subject: [PATCH] plist_data_compare: Make sure to compare the node sizes for
5 integer nodes
6
7 Without this check, e.g. the values -1 and 18446744073709551615 would yield in a
8 match, since the comparison will just compare the uint64_t values. However, any
9 value >= 9223372036854775808 and <= 18446744073709551615 is stored as a 128 bit
10 value in binary plist format to make sure it is recognized as an unsigned value.
11 We store it internally as a uint64_t value, but we set the size to 16 vs. 8
12 accordingly; so this commit will make sure the binary plist optimization will
13 not re-use matching uint64_t values of actually mismatching signed/unsigned values.
14 ---
15 src/plist.c | 2 ++
16 1 file changed, 2 insertions(+)
17
18 diff --git a/src/plist.c b/src/plist.c
19 index 1ff17fc..d20a252 100644
20 --- a/src/plist.c
21 +++ b/src/plist.c
22 @@ -701,6 +701,8 @@ int plist_data_compare(const void *a, const void *b)
23 case PLIST_UINT:
24 case PLIST_REAL:
25 case PLIST_UID:
26 + if (val_a->length != val_b->length)
27 + return FALSE;
28 if (val_a->intval == val_b->intval) //it is an union so this is sufficient
29 return TRUE;
30 else

  ViewVC Help
Powered by ViewVC 1.1.30