SS_FSUpdate: Fix to cast into bigger type before operation 14/317314/1
authorSangYoun Kwak <sy.kwak@samsung.com>
Mon, 30 Dec 2024 09:38:41 +0000 (18:38 +0900)
committerSangYoun Kwak <sy.kwak@samsung.com>
Mon, 30 Dec 2024 09:38:41 +0000 (18:38 +0900)
commita7edc2277f0103cab39d032cc6a3b74cc3930aa1
tree02b3218d1ab1d6ab6237f8b9c8a27ad92a2c3c1b
parent237bb8efd43bcc12dd9594d3e182e548a206f09a
SS_FSUpdate: Fix to cast into bigger type before operation

Since the operands are int, SS_UINT32(unsigned int) and long type, it is
required to cast them into a big enough type before adding them.
(Thier value are all non-negative values)

To resolve this issue, operands are casted to uint64_t, which is big
enough to store the value of the variables and the result of the
arithmetic operation.

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