util: Add handling code to safely read and write arrays 08/314908/2 accepted/tizen_unified accepted/tizen_unified_toolchain accepted/tizen_unified_x accepted/tizen_unified_x_asan tizen accepted/tizen/unified/20241121.055622 accepted/tizen/unified/toolchain/20240812.133042 accepted/tizen/unified/x/20240725.154625 accepted/tizen/unified/x/asan/20240813.231330
authorYunhee Seo <yuni.seo@samsung.com>
Tue, 16 Jul 2024 07:21:32 +0000 (16:21 +0900)
committerYunhee Seo <yuni.seo@samsung.com>
Wed, 24 Jul 2024 07:01:24 +0000 (16:01 +0900)
commit74b327e8fe2cfaa6cdc6b3e4994cdbf5c361938d
tree2ac1395812907b7fbc04ade7ba2f208df01967e9
parente20823a5b4ce4cc25f7e90461575434c0de80651
util: Add handling code to safely read and write arrays

There was a missing code for handling the null character
so that it doesn't exceed the array size when reading and storing strings.
The code has been modified to handle the array safely.
To avoid overflow issue, this is necessary.

Change-Id: Ib75301a07906391c57fb739ef3399ff211cd1503
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
src/util.c