mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-01-29 21:49:05 +00:00
hv: remove the usage of 'atoi()'
this function is not from libc but has the same name, atoi() in libc is unbounded and not safe. replace this function with 'strtol_deci()' in this case. Tracked-On: #2187 Signed-off-by: Yonghua Huang <yonghua.huang@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
@@ -157,11 +157,6 @@ uint64_t strtoul_hex(const char *nptr)
|
||||
return acc;
|
||||
}
|
||||
|
||||
int32_t atoi(const char *str)
|
||||
{
|
||||
return (int32_t)strtol_deci(str);
|
||||
}
|
||||
|
||||
char *strchr(char *s_arg, char ch)
|
||||
{
|
||||
char *s = s_arg;
|
||||
|
||||
Reference in New Issue
Block a user