Open
Description
In line 76 value
may have type different from '*bool'.
The type assertion assumes that value is not zero and that value stores a value of type *bool,
otherwise the command will cause panic. If value is checked for zero in line 73, then apparently a check for the *bool type is performed in line 76, but such a check is incorrect, because it will cause panic if the value type does not match the *bool
type.
I think it would be safer to use the following construction:
if _, ok :=value.(*bool); ok { ... }
Found by Linux Verification Center (portal.linuxtesting.ru) with SVACE.
Author A. Burke.
Metadata
Assignees
Labels
No labels
Activity