Comparison of unsigned with zero in iptc_data_remove_dataset - solution included
Brought to you by:
dmoore
iptc-data.c: in function iptc_data_remove_dataset:
int
iptc_data_remove_dataset (IptcData *data, IptcDataSet *dataset)
{
unsigned int i;
...
i = iptc_data_dataset_index (data, dataset);
if (i < 0) return -1;
^^^^^
...
}
As a result, if a dataset index is not found, and '-1' is returned, function will try to remove a dataset with index 0xFFFFFFFF.
Solution:
if ((int)i < 0) return -1;
Maybe this is more like a bug, than a patch, but let just not miss it.