@@ -321,6 +321,11 @@ bool appimage_get_elf_section_offset_and_length(const char* fname, const char* s
321321 data = mmap (NULL , map_size , PROT_READ , MAP_SHARED , fd , 0 );
322322 close (fd );
323323
324+ if (data == MAP_FAILED ) {
325+ fprintf (stderr , "Failed to mmap file %s: %s\n" , fname , strerror (errno ));
326+ return false;
327+ }
328+
324329 // this trick works as both 32 and 64 bit ELF files start with the e_ident[EI_NINDENT] section
325330 unsigned char class = data [EI_CLASS ];
326331
@@ -1009,7 +1014,6 @@ int fusefs_main(int argc, char* argv[], void (* mounted)(void)) {
10091014 sqfs_ll * ll ;
10101015 struct fuse_opt fuse_opts [] = {
10111016 {"offset=%zu" , offsetof(sqfs_opts , offset ), 0 },
1012- {"auto_unmount" , 0 },
10131017 {"timeout=%u" , offsetof(sqfs_opts , idle_timeout_secs ), 0 },
10141018 {"fsname=squashfuse" , 0 },
10151019 {"subtype=squashfuse" , 0 },
@@ -1042,7 +1046,7 @@ int fusefs_main(int argc, char* argv[], void (* mounted)(void)) {
10421046 opts .image = NULL ;
10431047 opts .mountpoint = 0 ;
10441048 opts .offset = 0 ;
1045- opts .idle_timeout_secs = 1 ;
1049+ opts .idle_timeout_secs = 0 ;
10461050 if (fuse_opt_parse (& args , & opts , fuse_opts , sqfs_opt_proc ) == -1 )
10471051 sqfs_usage (argv [0 ], true, true);
10481052
0 commit comments