The Samba-Bugzilla – Attachment 15088 Details for
Bug 13907
regfio: Return instead of assert for short blocks
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
regfio: Return instead of assert for short blocks
0001-regfio-Return-instead-of-assert-for-short-blocks.patch (text/plain), 1.17 KB, created by
hansmi
on 2019-04-19 18:59:36 UTC
(
hide
)
Description:
regfio: Return instead of assert for short blocks
Filename:
MIME Type:
Creator:
hansmi
Created:
2019-04-19 18:59:36 UTC
Size:
1.17 KB
patch
obsolete
>From 1abf2aa0f6fb8e202667dd09acb860ffd3cfacc5 Mon Sep 17 00:00:00 2001 >Message-Id: <1abf2aa0f6fb8e202667dd09acb860ffd3cfacc5.1555700193.git.public@hansmi.ch> >From: Michael Hanselmann <public@hansmi.ch> >Date: Thu, 4 Apr 2019 02:26:13 +0200 >Subject: [PATCH] regfio: Return instead of assert for short blocks > >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> >--- > source3/registry/regfio.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > >diff --git a/source3/registry/regfio.c b/source3/registry/regfio.c >index 32e166a1223..60c865d4d22 100644 >--- a/source3/registry/regfio.c >+++ b/source3/registry/regfio.c >@@ -552,7 +552,8 @@ static REGF_HBIN* read_hbin_block( REGF_FILE *file, off_t offset ) > 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) */ >-- >2.11.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 13907
: 15088