From 3b0ba17f3d849f896106470358e0ed1464d40988 Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Mon, 29 Dec 2014 18:32:53 +0100 Subject: [PATCH] Avoiding a SIGSEGV with loading a faulty ISO filesystem. Debian bug 774152. Thanks to Jakub Wilk. --- libisofs/fs_image.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libisofs/fs_image.c b/libisofs/fs_image.c index 0a541e2..ced92db 100644 --- a/libisofs/fs_image.c +++ b/libisofs/fs_image.c @@ -1477,7 +1477,7 @@ int iso_file_source_new_ifs(IsoImageFilesystem *fs, IsoFileSource *parent, /* * Directory entries can only have one section (ECMA-119, 6.8.1) */ - if (record->flags[0] & 0x02) { + if ((record->flags[0] & 0x02) || (flag & 1)) { iso_msg_submit(fsdata->msgid, ISO_WRONG_ECMA119, 0, "Directories with more than one section are not allowed."); {ret = ISO_WRONG_ECMA119; goto ex;}