Skip to content

somewhat complex path causes core dump #201

@aguaviva

Description

@aguaviva

was run using:

user@nube:~/rar2fs-1.29.7/src$ ./rar2fs -f -o allow_other,debug  --seek-length=1 /media/General/torrent/Biblioteca\ 88.234\ \(EPUB\)\ \(ESP\)/Biblioteca_2021_88.234.part01.rar mydir
Segmentation fault (core dumped)

GDB output:

user@nube:~/rar2fs-1.29.7/src$ gdb ./rar2fs /var/lib/apport/coredump/core._home_user_rar2fs-1_29_7_src_rar2fs.1000.a8b30367-04ac-4e6e-b885-e757d5147d91.41685.8865118 
GNU gdb (Ubuntu 15.0.50.20240403-0ubuntu1) 15.0.50.20240403-git
[...]
Reading symbols from ./rar2fs...
[New LWP 41685]

This GDB supports auto-downloading debuginfo from the following URLs:
  <https://debuginfod.ubuntu.com>
Enable debuginfod for this session? (y or [n]) y
Debuginfod has been enabled.
To make this setting permanent, add 'set debuginfod enabled on' to .gdbinit.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `./rar2fs -f -o allow_other,debug --seek-length=1 /media/General/torrent/Bibliot'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00005d3761ebccd6 in wcsncpyz(wchar_t*, wchar_t const*, unsigned long) ()

note dbg shows a truncated path

update: same issue using a shorter path with no spaces

Core was generated by `/home/user/rar2fs-1.29.7/src/rar2fs Biblioteca_2021_88.234.part01.rar /tmp/1'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x000060dab216acd6 in wcsncpyz(wchar_t*, wchar_t const*, unsigned long) ()
(gdb) 

update2: using a folder name instead of a filename seems to work

user@nube:~/rar2fs-1.29.7/src$ ./rar2fs -f -o allow_other,debug  --seek-length=1 . mydir
Segmentation fault (core dumped)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions