hroptatyr / yuck

Your Umbrella Command Kit, a bog-standard command line option parser for C with all the knickknackery and whatnots.
Other
61 stars 7 forks source link

Fix V595 warning from PVS-Studio Static Analyzer #14

Closed buslov closed 7 years ago

buslov commented 7 years ago

I'm a member of the Pinguem.ru competition on finding errors in open source projects. A bug, found using PVS-Studio.

Warning: V595 The 'i->s' pointer was utilized before it was verified against nullptr.

hroptatyr commented 7 years ago

Hey there, thanks for the report, much appreciated.

However, can you tell me the codepath where i->s can be a used as a null pointer? I think this is a false positive in PVS studio. bbuf_cpy's return value is checked which is i->s.

hroptatyr commented 7 years ago

Like I said, a false positive in PVS studio.