upgrade-apply: Fix to check return value properly 52/315252/2
authorSangYoun Kwak <sy.kwak@samsung.com>
Mon, 29 Jul 2024 06:06:05 +0000 (15:06 +0900)
committerSangYoun Kwak <sy.kwak@samsung.com>
Tue, 30 Jul 2024 05:24:45 +0000 (14:24 +0900)
commitaeb2317e96d498f3df8b3ae750e3804ded374e75
tree529cb694c68601e46dfecc386bdcd5023996c2cf
parent3ca493565df532751dd53f807dc1b081f2767cdc
upgrade-apply: Fix to check return value properly

tar_block_read() function can return negative integer and it should be
handled properly. In the previous code, only '-1' and '0' cases are
handled but no negative values less than '-1'.

To fix this issue, negative values less than '-1' is also handled.

Change-Id: Ib3fd0478b008cbe298694ccc10ddf66cfbb7604e
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
src/upgrade-apply/main.c
src/upgrade-apply/patch/patch.c