Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/wim.c
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,12 @@ int wim_path ( struct vdisk_file *file, struct wim_header *header,
sizeof ( security ) ) ) != 0 )
return rc;

/* Special case: the header of an an empty security block
may contain a length of 0, although we must still consider a
minimum header length of 8 */
if (security.len == 0)
security.len = sizeof(security);

/* Get root directory offset */
direntry->subdir = ( ( security.len + sizeof ( uint64_t ) - 1 ) &
~( sizeof ( uint64_t ) - 1 ) );
Expand Down