RE: [EXTERNAL] Re: [PATCH v2 1/1] event/octeontx: resolve possible integer overflow

2024-10-23 Thread Hanumanth Reddy Pothula
From: Stephen Hemminger Sent: Wednesday, October 23, 2024 9:46 PM To: Hanumanth Reddy Pothula Cc: Jerin Jacob ; dev@dpdk.org; Harman Kalra Subject: [EXTERNAL] Re: [PATCH v2 1/1] event/octeontx: resolve possible integer overflow On Wed, 23 Oct 2024 12: 45: 46 +0530 Hanumanth Pothula wrote

Re: [PATCH v2 1/1] event/octeontx: resolve possible integer overflow

2024-10-23 Thread Stephen Hemminger
On Wed, 23 Oct 2024 12:45:46 +0530 Hanumanth Pothula wrote: > static int > -ssovf_parsekv(const char *key __rte_unused, const char *value, void *opaque) > +ssovf_parsekv(const char *key, const char *value, void *opaque) > { > - int *flag = opaque; > - *flag = !!atoi(value); > + uint

[PATCH v2 1/1] event/octeontx: resolve possible integer overflow

2024-10-23 Thread Hanumanth Pothula
The last argument passed to ssovf_parsekv() is an unsigned char*, but it is accessed as an integer. This can lead to an integer overflow. Hence, make ensure the argument is accessed as a char and for better error handling use strtol instead of atoi. Signed-off-by: Hanumanth Pothula --- v2: use