Fix a possible sign-bit overwrite when a uint32_t integer is given to signed integral... 24/307424/2
authorSung-hun Kim <sfoon.kim@samsung.com>
Fri, 8 Mar 2024 02:00:54 +0000 (11:00 +0900)
committerSung-hun Kim <sfoon.kim@samsung.com>
Fri, 8 Mar 2024 07:32:16 +0000 (16:32 +0900)
commitd74b30c109139c25387507fc70cb4c3e7915f8c5
tree6389364b49c650b624b3162df49e464b4083bd85
parent0cfe4e2ef3b44786804517ff7394746d23750ef6
Fix a possible sign-bit overwrite when a uint32_t integer is given to signed integral type

Since std::streamoff is a typedef of signed integral type, the sign bit of std::streamoff can be
overwritten by the given uint32_t value. This patch handles the case in a separated manner.

This patch fixes svace issues (wgid: 706371, 704245).

Change-Id: Ib79e0af8af99dafb24336ed261d018ddf22be362
Signed-off-by: Sung-hun Kim <sfoon.kim@samsung.com>
src/livedumper/core.hpp