Revert "Fix SVACE issues" 69/316569/1 accepted/tizen/unified/20241216.185847 accepted/tizen/unified/x/20241218.032717 accepted/tizen/unified/x/asan/20241224.004443
authorSangYoun Kwak <sy.kwak@samsung.com>
Fri, 13 Dec 2024 10:20:19 +0000 (19:20 +0900)
committerSangYoun Kwak <sy.kwak@samsung.com>
Fri, 13 Dec 2024 10:20:57 +0000 (19:20 +0900)
commit6cacd5bf36094d1e360b6d21885214fac7617bd0
tree2386b1fce58ee2581a607a27e80f474bd39e8aec
parent2d5b2b6fc3a1a9cb45976a47565a03b3f6d6e515
Revert "Fix SVACE issues"

Since the original code was OK but the SVACE issue was false positive,
revert it and return to the original code.

Below is an explanation why the original is OK:
The second parameter of lseek() is __off64_t, which is a 64-bit signed
integer and the type of dwPosition is unsigned int, which is a 32-bit
unsigned integer. Since 64-bit signed integer can represent all possible
values of 32-bit unsigned integer, it is OK to use dwPosition as the
second parameter of lseek().
The issue says that __off64_t is long type, but it is only when the
build architecture is 64-bit. When the build architecture is 32-bit the
__off64_t is defined as __int64_t which is 64-bit signed integer.
Thus, the issue of the patch 2d5b2b6 is false positive and patch should
be reverted.

This reverts commit 2d5b2b6fc3a1a9cb45976a47565a03b3f6d6e515.

Change-Id: I8314655deed1be0802865fa1b9be270483a7eb4e
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
src/upgrade-apply-deltafs/engine/SS_FSUpdate.c