Closed ycaibb closed 3 years ago
Thanks for the report. However, this is impossible to happen in this situation: if sscanf()
returns 2, multiplier
(set by sscanf()
) is guaranteed to be in the string pointed to by str
, so strchr()
won't ever return NULL
here. Unless I'm missing something, though.
Thank you very much for your explanation. It seems our static tool doesn't model well for the strchr
and sscanf
method.
Dear developers: Our static analysis tool reports a NULL pointer dereference on here. The reason is that the function
strchr
may return null and should be checked before dereferencing at while site. I notice that functionstrchr
is invoked in many different contexts where it is checked for returning non-null for further usage. It may be a false positive. Thank you for your help.