HomeFreeBSD

Fix coverity defects: zfs channel programs

Description

Fix coverity defects: zfs channel programs

CID 173243, 173245: Memory - corruptions (OVERRUN)
Added size argument to lcompat_sprintf() to avoid use of INT_MAX

CID 173244: Integer handling issues (OVERFLOW_BEFORE_WIDEN)
Added cast to uint64_t to avoid a 32 bit overflow warning

CID 173242: Integer handling issues (CONSTANT_EXPRESSION_RESULT)
Conditionally removed unused luai_numisnan() floating point check

CID 173241: Resource leaks (RESOURCE_LEAK)
Added missing close(fd) on error path

CID 173240: (UNINIT)
Fixed uninitialized variable in get_special_prop()

CID 147560: Null pointer dereferences (NULL_RETURNS)
Cleaned up bad code merge in dsl_dataset_promote_check()

CID 28475: Memory - illegal accesses (OVERRUN)
Fixed lcompat_sprintf() to use a size paramater

CID 28418, 28422: Error handling issues (CHECKED_RETURN)
Added function result cast to (void) to avoid warning

CID 23935, 28411, 28412: Memory - corruptions (ARRAY_VS_SINGLETON)
Added casts to avoid exposing result as an array

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Don Brady <don.brady@delphix.com>
Closes #7181

Details

Provenance
Don Brady <don.brady@delphix.com>Authored on Feb 20 2018, 7:19 PM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Feb 20 2018, 7:19 PM
Parents
rG7b30ee6bafe9: Project dnode should be protected by local MAC
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rGcbce58135341: Fix coverity defects: zfs channel programs (authored by Don Brady <don.brady@delphix.com>).Feb 20 2018, 7:19 PM