Justus Winter <4winter at informatik.uni-hamburg.de> writes:
> Annotating functions that do not return with the noreturn attribute
> (which is understood by both gcc and clang) prevents static analyzers
> from generating false positives (internal_error is used to terminate
> the process and is
GMIME_IS_MULTIPART and GMIME_IS_MESSAGE both handle NULL pointers
gracefully, but the G_OBJECT_TYPE used in the error handling block
dereferences it without checking it first.
Fix this by checking whether parent->part is valid.
Found using the clang static analyzer.
Signed-off-by: Justus Winter
Annotating functions that do not return with the noreturn attribute
(which is understood by both gcc and clang) prevents static analyzers
from generating false positives (internal_error is used to terminate
the process and is used extensively in error handling code paths).
Remove the return
GMIME_IS_MULTIPART and GMIME_IS_MESSAGE both handle NULL pointers
gracefully, but the G_OBJECT_TYPE used in the error handling block
dereferences it without checking it first.
Fix this by checking whether parent-part is valid.
Found using the clang static analyzer.
Signed-off-by: Justus Winter
Justus Winter 4win...@informatik.uni-hamburg.de writes:
Annotating functions that do not return with the noreturn attribute
(which is understood by both gcc and clang) prevents static analyzers
from generating false positives (internal_error is used to terminate
the process and is used