Assertions should only be used when there's absolutely no recovery or to
verify data structure invariants. In this case the supplied registry
hive file may have a malformed block with a size of zero. Such a block
should not terminate the whole program.
Signed-off-by: Michael Hanselmann <public@hansmi.ch>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
if ( !prs_uint32( "header", &hbin->ps, 0, &header ) )
return NULL;
- SMB_ASSERT( record_size != 0 );
+ if (record_size == 0)
+ return NULL;
if ( record_size & 0x80000000 ) {
/* absolute_value(record_size) */