projects
/
platform
/
core
/
system
/
upgrade.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ecccf0a
)
upgrade-apply: Fix parsing overflow
24/320424/1
accepted/tizen_unified
accepted/tizen_unified_x
accepted/tizen/unified/20250304.070213
accepted/tizen/unified/x/20250304.080624
author
a.adaszkiewi
<a.adaszkiewi@samsung.com>
Fri, 28 Feb 2025 09:38:38 +0000
(10:38 +0100)
committer
a.adaszkiewi
<a.adaszkiewi@samsung.com>
Fri, 28 Feb 2025 09:38:38 +0000
(10:38 +0100)
Previous mask was equal to max 32-bit signed int, resulting in an
overflow for larger values.
Change-Id: I2ecf7d37928522fb22f888fae485731cca5aef24
src/upgrade-apply/patch/patch.c
patch
|
blob
|
history
diff --git
a/src/upgrade-apply/patch/patch.c
b/src/upgrade-apply/patch/patch.c
index 93989aec11a338f321dc05b12044e55bbae3b748..5fb9da6fb186fdac4b5cb01e9c1021fdbc72c153 100644
(file)
--- a/
src/upgrade-apply/patch/patch.c
+++ b/
src/upgrade-apply/patch/patch.c
@@
-298,7
+298,7
@@
static int64_t parse_ssint(unsigned char *buff)
* (In other words, an INTEGER is a 64-byte signed integer in sign-magnitude
* format, stored in little-endian byte order.)
*/
- int64_t result = *(int64_t*)buff & 0x7fffffff;
+ int64_t result = *(int64_t*)buff & 0x7fffffff
ffffffff
;
if ((buff[7] & 0x80) != 0)
result = -result;