util: Add handling code to safely read and write arrays 14/314914/3 accepted/tizen_9.0_unified accepted/tizen_unified accepted/tizen_unified_dev accepted/tizen_unified_x_asan tizen tizen_9.0 accepted/tizen/9.0/unified/20241031.000146 accepted/tizen/unified/20240725.155018 accepted/tizen/unified/dev/20240729.000901 accepted/tizen/unified/x/asan/20241224.003811 tizen_9.0_m2_release
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 06:48:26 +0000 (15:48 +0900)
commit1e5f505c977a59b2c220776e50a7699dcd47fcf2
tree45339159873e15d54ee6191b643821daf6b32f10
parent0bb93d522f4f7aa05fd8f9b81e8654c38bbf4771
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