util: Add handling code to safely read and write arrays 10/314610/1 accepted/tizen_9.0_unified accepted/tizen_unified accepted/tizen_unified_dev accepted/tizen_unified_x accepted/tizen_unified_x_asan tizen tizen_9.0 accepted/tizen/9.0/unified/20241030.234951 accepted/tizen/unified/20240717.060540 accepted/tizen/unified/dev/20240718.035909 accepted/tizen/unified/x/20241218.081932 accepted/tizen/unified/x/asan/20241224.003800 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>
Tue, 16 Jul 2024 07:21:32 +0000 (16:21 +0900)
commit341cd2384ad231ac0d081b5c8a8ad11df7c893d2
tree8f40ce909b6796cfde4be0f5238728ee783acbf1
parentc8642611f1cdb43f22943b8b7bf8286d4df157e7
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