diff options
Diffstat (limited to 'source/registry/regfio.c')
-rw-r--r-- | source/registry/regfio.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source/registry/regfio.c b/source/registry/regfio.c index 3a554177a4c..3e3e7e480c5 100644 --- a/source/registry/regfio.c +++ b/source/registry/regfio.c @@ -642,8 +642,12 @@ static BOOL hbin_prs_lf_records( const char *desc, REGF_HBIN *hbin, int depth, R return False; if ( UNMARSHALLING(&hbin->ps) ) { - if ( !(lf->hashes = PRS_ALLOC_MEM( &hbin->ps, REGF_HASH_REC, lf->num_keys )) ) - return False; + if (lf->num_keys) { + if ( !(lf->hashes = PRS_ALLOC_MEM( &hbin->ps, REGF_HASH_REC, lf->num_keys )) ) + return False; + } else { + lf->hashes = NULL; + } } for ( i=0; i<lf->num_keys; i++ ) { |