img-verifier: Fix build error due to overflow by read 82/319882/2
authorUnsung Lee <unsung.lee@samsung.com>
Wed, 19 Feb 2025 05:05:09 +0000 (14:05 +0900)
committerUnsung Lee <unsung.lee@samsung.com>
Wed, 19 Feb 2025 07:37:12 +0000 (16:37 +0900)
commit394d61b5c2de43c5006167bffcf4b3e31cd6a750
tree00aaa3e03d03ac8be4426babd9cd5959d14e9d0c
parenta4ea25da7d3b118b0753f23f7cfac820c2f94fbb
img-verifier: Fix build error due to overflow by read

Fix build error when Werror=stringop-overflow flag is turned on.
This flag returns build error if read buffer size is smaller than read size.
To solve this problem, declare a separate structure that manages only the metadata of signed_file.
Then, change it so that the address of this structure is passed to the read function.

Change-Id: I88e18ec19ac71f538b1300d0028b29563bcd58b7
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
src/img-verifier/img-verifier.c
src/img-verifier/img-verifier.h