Hi,
during regular check static analysis tool reported an issue in giftool.c getbool() function. Looking at the code and history it seems that some tool already complained about it previously but the fix used probably does not work as intended.
Function converts possible string representations of boolean value to boolean. It creates a list and in loop tries to match the parameter. When no match is found, the for-loop will end with sp->name being null. Last element from boolnames. That means that the check, that was added recently:
81: if (sp == NULL) {
will never evaluate as true and the following block won't be executed, this previously made some static analyzer silent as the code with the issue would never be reached.
inside the block is error message that the presented string argument does not represent any boolean value and it's supposed to write the offending string. That offending string is present in 'from' variable not sp->name which would be NULL after the for-loop and original source of complain from the analyzer.
correction:
1) drop the null check or change it to check 'from' instead
2) change fprintf argument from 'sp->name' to 'from'
Fix pushed,