Menu

#7 iptc-data.c:607: poor error checking ?

v1.0_(example)
open
nobody
None
5
2016-12-22
2016-12-22
dcb
No

[iptc-data.c:607]: (style) Checking if unsigned variable 'i' is less than zero.

Source code is

i = iptc_data_dataset_index (data, dataset);
if (i < 0) return -1;

but

unsigned int i;

Suggest put return value from function into local variable
of type int, then sanity check it >= 0, then write it into
local variable i.

[pyiptcdata.c:172]: (style) Checking if unsigned variable 'old_ps3_len' is less than zero.

Probable duplicate.

Discussion


Log in to post a comment.

MongoDB Logo MongoDB