Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 537932

Summary: app-admin/testdisk-6.14 - testdisk: segmentation fault in filesort (a=0x9f3c60, b=0x9f3cc0) at dir.c:344 when listing files
Product: Gentoo Linux Reporter: jospezial <jospezial>
Component: Current packagesAssignee: Robin Johnson <robbat2>
Status: RESOLVED FIXED    
Severity: normal CC: forensics+obsolete, nicolasbock
Priority: Normal Keywords: PATCH
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: fix_rare_crash_when_listing_NTFS_directories.patch for 6.14

Description jospezial 2015-01-27 03:41:13 UTC
app-admin/testdisk-6.14 crashes when listing files of win7 ntfs system partition.
Ext4 and another ntfs winXP partition work.

in dmesg:
[17547.948465] testdisk[23724]: segfault at 0 ip 00007fb7468b7cca sp 00007fffcf9102d8 error 4 in libc-2.20.so[7fb746836000+196000]



Program received signal SIGSEGV, Segmentation fault.
__strcmp_sse2 () at ../sysdeps/x86_64/multiarch/../strcmp.S:210
210     ../sysdeps/x86_64/multiarch/../strcmp.S: Datei oder Verzeichnis nicht gefunden.
(gdb) thread apply all bt f

Thread 1 (Thread 0x7f8ed9ea3780 (LWP 23728)):
#0  __strcmp_sse2 () at ../sysdeps/x86_64/multiarch/../strcmp.S:210
No locals.
#1  0x00000000004569c6 in filesort (a=0x9f3c60, b=0x9f3cc0) at dir.c:344
        file_a = 0x9f3c60
        file_b = 0x9f3cc0
        res = 0
#2  0x000000000040a71b in merge (cmp=0x456864 <filesort>, a=0x9f3c60, b=0x9f3cc0) at list_sort.c:47
        head = {next = 0x99fde0, prev = 0x9f18d0}
        tail = 0x7ffffb6bf800
#3  0x000000000040a98e in td_list_sort (head=0x7ffffb6bf9d0, cmp=0x456864 <filesort>) at list_sort.c:142
        cur = 0x9f3cc0
        part = {0x9f3c60, 0x0, 0x99fde0, 0x964e10, 0x0 <repeats 17 times>}
        lev = 0
        max_lev = 3
        list = 0x9f3d20
#4  0x000000000045a999 in ntfs_dir (disk_car=0x95e080, partition=0x95ec00, dir_data=0x7ffffb6bfac0, 
    cluster=5, dir_list=0x7ffffb6bf9d0) at ntfs_dir.c:325
        inode = 0x9c9e00
        pos = 13312
        ls = 0x9d2010
#5  0x000000000042dba0 in dir_partition_aux (disk=0x95e080, partition=0x95ec00, dir_data=0x7ffffb6bfac0, 
    inode=5, depth=0, current_cmd=0x7ffffb6c02a8) at dirn.c:545
        current_directory_namelength = 1
        new_inode = -1
        dir_list = {list = {next = 0x964e10, prev = 0xa05200}, name = 0x0, st_ino = 0, st_mode = 0, 
          st_uid = 0, st_gid = 0, st_size = 0, td_atime = 0, td_mtime = 0, td_ctime = 0, status = 0}
        inode_known = {5, 0 <repeats 255 times>}
#6  0x000000000042dd4e in dir_partition_aff (disk=0x95e080, partition=0x95ec00, dir_data=0x7ffffb6bfac0, 
    inode=5, current_cmd=0x7ffffb6c02a8) at dirn.c:582
No locals.
---Type <return> to continue, or q <return> to quit---
#7  0x000000000042e6d7 in dir_partition (disk=0x95e080, partition=0x95ec00, verbose=0, 
    current_cmd=0x7ffffb6c02a8) at dirpart.c:179
        recursive = 0
        dir_data = {display = 0x9a8c90, current_directory = "/", '\000' <repeats 1022 times>, 
          current_inode = 5, verbose = 0, param = 16, capabilities = 2, get_dir = 0x45a88b <ntfs_dir>, 
          copy_file = 0x45a9b4 <ntfs_copy>, close = 0x45ad9d <dir_partition_ntfs_close>, local_dir = 0x0, 
          private_dir_data = 0x9d2010}
        window = 0x9a8c90
        res = DIR_PART_OK
#8  0x00000000004282dc in interface_adv (disk_car=0x95e080, verbose=0, dump_ind=0, expert=0, 
    current_cmd=0x7ffffb6c02a8) at adv.c:553
        partition = 0x95ec00
        options = 0x464b8f "tlubcq"
        menuAdv = {{key = 116, name = 0x464c83 "Type", 
            desc = 0x464c88 "Change type, this setting will not be saved on disk"}, {key = 98, 
            name = 0x464cbc "Boot", desc = 0x464cc1 "Boot sector recovery"}, {key = 115, 
            name = 0x464cd6 "Superblock", desc = 0x0}, {key = 108, name = 0x464ce1 "List", 
            desc = 0x464ce6 "List and copy files"}, {key = 117, name = 0x464cfa "Undelete", 
            desc = 0x464d03 "File undelete"}, {key = 99, name = 0x464d11 "Image Creation", 
            desc = 0x464d20 "Create an image"}, {key = 113, name = 0x464d30 "Quit", 
            desc = 0x464d35 "Return to main menu"}, {key = 0, name = 0x0, desc = 0x0}}
        command = 108
        i = 1
        offset = 0
        current_element_num = 0
        old_LINES = 33
        rewrite = 0
        menu = 3
        element = 0x0
        list_part = 0x900710
        current_element = 0x900710
#9  0x00000000004503ec in menu_disk_ncurses (disk=0x95e080, verbose=0, dump_ind=0, saveheader=0, 
---Type <return> to continue, or q <return> to quit---
    current_cmd=0x7ffffb6c02a8) at tdiskop.c:184
        real_key = 13
        command = 84
        align = 1
        ask_part_order = 0
        expert = 0
        options = "AGOPTQ\000\000p F\000\000\000\000"
        menuMain = {{key = 65, name = 0x46de78 "Analyse", 
            desc = 0x46de80 "Analyse current partition structure and search for lost partitions"}, {key = 84, 
            name = 0x46dec3 "Advanced", desc = 0x46decc "Filesystem Utils"}, {key = 71, 
            name = 0x46dedd "Geometry", desc = 0x46dee6 "Change disk geometry"}, {key = 79, 
            name = 0x46defb "Options", desc = 0x46df03 "Modify options"}, {key = 67, 
            name = 0x46df12 "MBR Code", desc = 0x46df20 "Write TestDisk MBR code to first sector"}, {
            key = 68, name = 0x46df48 "Delete", desc = 0x46df50 "Delete all data in the partition table"}, {
            key = 81, name = 0x46df77 "Quit", desc = 0x46df7c "Return to disk selection"}, {key = 69, 
            name = 0x46df95 "Editor", desc = 0x46df9c "Basic disk editor"}, {key = 0, name = 0x0, desc = 0x0}}
        menu = 1
#10 0x000000000045047d in menu_disk (disk_car=0x95e080, verbose=0, dump_ind=0, saveheader=0, 
    current_cmd=0x7ffffb6c02a8) at tdiskop.c:203
No locals.
#11 0x0000000000450aa8 in testdisk_disk_selection_ncurses (verbose=0, dump_ind=0, list_disk=0x8ff300, 
    saveheader=0, current_cmd=0x7ffffb6c02a8) at tdisksel.c:199
        disk = 0x95e080
        hpa_dco = 0
        options = 0x46e289 "OQ"
        i = 1
        command = 79
        menu = 2
        offset = 0
        pos_num = 0
        use_sudo = 0
        element_disk = 0x0
---Type <return> to continue, or q <return> to quit---
        current_disk = 0x8ff300
        menuMain = {{key = 80, name = 0x46e291 "Previous", desc = 0x46e29a ""}, {key = 78, 
            name = 0x46e29b "Next", desc = 0x46e29a ""}, {key = 79, name = 0x46e2a0 "Proceed", 
            desc = 0x46e29a ""}, {key = 83, name = 0x46e2a8 "Sudo", 
            desc = 0x46e2b0 "Use the sudo command to restart as root"}, {key = 81, name = 0x46e2d8 "Quit", 
            desc = 0x46e2dd "Quit program"}, {key = 0, name = 0x0, desc = 0x0}}
#12 0x0000000000450cf1 in do_curses_testdisk (verbose=0, dump_ind=0, list_disk=0x8ff300, saveheader=0, 
    cmd_device=0x0, current_cmd=0x7ffffb6c02a8) at tdisksel.c:266
No locals.
#13 0x0000000000452343 in main (argc=2, argv=0x7ffffb6c0428) at testdisk.c:430
        i = 2
        use_sudo = 0
        help = 0
        version = 0
        verbose = 0
        dump_ind = 0
        create_log = 0
        do_list = 0
        unit = 0
        write_used = 32654
        saveheader = 0
        create_backup = 0
        run_setlocale = 1
        done = 0
        safe = 0
        testdisk_mode = 6
        list_disk = 0x8ff300
        element_disk = 0x0
        cmd_device = 0x0
        cmd_run = 0x0
        logfile = 0x46e3ec "testdisk.log"
        log_handle = 0x0
---Type <return> to continue, or q <return> to quit---
        log_errno = 0

bastellinux ~ # emerge --info testdisk
Portage 2.2.15 (python 3.3.5-final-0, default/linux/amd64/13.0, gcc-4.9.2, glibc-2.20-r1, 3.19.0-rc6 x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-3.19.0-rc6-x86_64-AMD_Athlon-tm-_II_X2_240_Processor-with-gentoo-2.2
KiB Mem:     4047452 total,   1390708 free
KiB Swap:    7103480 total,   7103480 free
Timestamp of tree: Mon, 26 Jan 2015 20:45:01 +0000
sh bash 4.3_p33-r1
ld GNU ld (Gentoo 2.24 p1.4) 2.24
ccache version 3.2.1 [enabled]
app-shells/bash:          4.3_p33-r1
dev-java/java-config:     2.2.0
dev-lang/perl:            5.20.1-r4
dev-lang/python:          2.7.9-r1, 3.3.5-r1, 3.4.2
dev-util/ccache:          3.2.1-r1
dev-util/cmake:           3.1.0
dev-util/pkgconfig:       0.28-r2
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.13.8
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.10.3-r1, 1.11.6-r1, 1.12.6, 1.15
sys-devel/binutils:       2.24-r3
sys-devel/gcc:            4.9.2
sys-devel/gcc-config:     1.8
sys-devel/libtool:        2.4.5
sys-devel/make:           4.1-r1
sys-kernel/linux-headers: 3.18 (virtual/os-headers)
sys-libs/glibc:           2.20-r1
Repositories: gentoo overlay_jl
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--autounmask-write=y --keep-going --quiet-build=y"
FCFLAGS="-march=native -O2 -pipe"
FEATURES="assume-digests binpkg-logs ccache config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-march=native -O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="de_DE.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.de.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext 64bit X Xaw3d a52 aac aacplus aacs aalib ace acl acpi activefilter aften alsa amd64 ap apm apng archive async audacious audiofile automount bazaar berkdb binary-drivers binfilter blender-game bluetooth bluray boost bzip2 bzr cairo canusb ccache cdda cddb cdio cdparanoia cdr cdrdao cdrom cgi charconv chm chroot city cjk clang cleartype cli colordiff colors compress consolekit corefonts cpio cracklib crypt css cue cups curl curlwrappers cvs cxx daemon dbus declarative device-mapper dga dhcp doom doomsday dos download-subs dri dri3 dts dump dv dvb dvd dvdnav eap eap-sim eap-tls ebook egl emerald emoticon enca encode enscript equalizer exif extensions extras faac faad fam fat fax fbcon ffmpeg fftw firefox flac fluidsynth fontconfig foomaticdb fortran freedoom ftp fts3 fuse g3dvl gallium gbm gd gdbm gdu geoip gif gimp git glamor glut gme gnutls gphoto2 gpm graphite gsm gstreamer gtk gtk3 gudev gui gzip hddtemp hdf hdf5 heretic hexen highlight hpcups hpijs http hwdb iconv icq icu id3 id3tag idn imagemagick introspection ios ipc ipod ipv6 jack java javascript jit jpeg jpeg2k kate kde keymap ladspa lame laptop lcms lensfun lha libass libcaca libcanberra libkms libnl libnotify libsamplerate libssh2 libtiger libv4l libv4l2 libwww llvm-shared-libs lm_sensors logrotate lua lxde lzma lzo mad madwifi magic man matroska md5sum metalink midi mikmod mime minizip mixer mjpeg mmap mms mmx mmxext mng mobi mod modplug modules mono mouse mozilla mp3 mp4 mpeg mpeg2 mplayer mtp multilib multislot musepack musicbrainz nano-syntax ncat ncurses ndiff network nfs nfsidmap nfsv3 nfsv4 nfsv41 nls nmap nmap-update nokia normalize nowlistening nping nptl nsplugin ntfs ntfsprogs ntp nvidia nvram obex ocr ogg ogm openal opencl opengl openmax openmp openssl optimized-qmake oscar osdmenu otr p2p pam pango panorama parport parse-clocks pcap pci pcre pdf pdfimport phonon pipes plasma plugins pm-utils pmu png policykit postscript ppds privacy projectm projectx pulseaudio pvr python python3 qalculate qt3support qt4 quicktime r600-llvm-compiler radio rar raw rdesktop readline recording redeyes reiser4 reiserfs remote-access remoteosd replaygain rpm rtc rtmp rtsp rubberband samba sbsms scanner schroedinger sdl secure-delete semantic-desktop sensord session sftp sha512 shorten shout skins slang smbclient smi sndfile snowberry sockets sound soundtouch sox speex spell sql sqlite sqlite3 sse sse2 sse3 sse4 sse4_2 ssh ssl startup-notification statistics stk stream subtitles subversion svg swat symlink syslog szip taglib tcpd texteffect tftp theora threads thumbnail tiff translator truetype twolame udev udisks unicode upcall upower urlpicpreview usb v4l vaapi vamp vcd vcdx vdpau video videos vim-syntax virtualbox vlm vnc vorbis vpx vroot vst wad wav wavpack webgl webkit webm webpresence wifi winbind winpopup wireshark wmf wps wxwidgets x264 x265 xa xattr xcb xcomposite xfs xine xinerama xinetd xml xmp xorg xosd xpm xrandr xscreensaver xv xvid xvmc zenmap zip zlib zvbi" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev keyboard mouse joystick" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="de" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python3_3" PYTHON_TARGETS="python2_7 python3_3 python3_4" RUBY_TARGETS="ruby19 ruby20 ruby21" USERLAND="GNU" VIDEO_CARDS="fbdev vesa svga vga radeon v4l modesetting r100 r200 r300 r600 nouveau" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON

=================================================================
                        Package Settings
=================================================================

app-admin/testdisk-6.14 was built with the following:
USE="jpeg ntfs reiserfs -static" ABI_X86="64"
CFLAGS="-march=native -g"

cat /proc/cpuinfo 
processor       : 0
vendor_id       : AuthenticAMD
cpu family      : 16
model           : 6
model name      : AMD Athlon(tm) II X2 240 Processor
stepping        : 2
microcode       : 0x10000c7
cpu MHz         : 800.000
cache size      : 1024 KB
physical id     : 0
siblings        : 2
core id         : 0
cpu cores       : 2
apicid          : 0
initial apicid  : 0
fpu             : yes
fpu_exception   : yes
cpuid level     : 5
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc rep_good nopl nonstop_tsc extd_apicid pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt hw_pstate npt lbrv svm_lock nrip_save vmmcall
bugs            : tlb_mmatch fxsave_leak
bogomips        : 5599.91
TLB size        : 1024 4K pages
clflush size    : 64
cache_alignment : 64
address sizes   : 48 bits physical, 48 bits virtual
power management: ts ttp tm stc 100mhzsteps hwpstate

processor       : 1
vendor_id       : AuthenticAMD
cpu family      : 16
model           : 6
model name      : AMD Athlon(tm) II X2 240 Processor
...
Comment 1 jospezial 2015-01-27 03:47:58 UTC
=================================================================
                        Package Settings
=================================================================

sys-libs/glibc-2.20-r1 was built with the following:
USE="gd (multilib) -debug (-hardened) -nscd -profile (-selinux) -suid -systemtap -vanilla" ABI_X86="64"
CFLAGS="-march=native -g -O2 -fno-strict-aliasing -fno-stack-protector"
CXXFLAGS="-march=native -pipe -O2 -fno-strict-aliasing -fno-stack-protector"




http://repo.or.cz/w/glibc.git/blob/b8079dd0d360648e4e8de48656c5c38972621072:/sysdeps/x86_64/multiarch/strcmp.S

208 #  define ENTRY2(name) \
209         .type __strncasecmp_sse2, @function; \
210         .align 16; \
211         .globl __strncasecmp_sse2; \
212         .hidden __strncasecmp_sse2; \
213         __strncasecmp_sse2: cfi_startproc; \
214         CALL_MCOUNT
Comment 2 jospezial 2015-01-27 05:43:23 UTC
If I run TestDisk 7.0-WIP compiled from git then all works.

I created a testdisk-9999.ebuild from testdisk-6.14.ebuild.
The only problem is it merges the docs into /var/tmp/portage/app-admin/testdisk-9999/image/usr/share/doc

and had that warnings before:

>>> Completed installing testdisk-9999 into /var/tmp/portage/app-admin/testdisk-9999/image/

 * QA Notice: files installed in ${D}/${D}:
 *   /
 *   /usr
 *   /usr/share
 *   /usr/share/doc
 *   /usr/share/doc/testdisk-9999
 *   /usr/share/doc/testdisk-9999/AUTHORS
 *   /usr/share/doc/testdisk-9999/THANKS
 *   /usr/share/doc/testdisk-9999/README
 *   /usr/share/doc/testdisk-9999/documentation.html
 *   /usr/share/doc/testdisk-9999/NEWS
 *   /usr/share/doc/testdisk-9999/ChangeLog
 * ERROR: app-admin/testdisk-9999::overlay_jl failed:
 *   Aborting due to QA concerns: 11 files installed in /var/tmp/portage/app-admin/testdisk-9999/image/var/tmp/portage/app-admin/testdisk-9999/image/
 * 
 * Call stack:
 *   misc-functions.sh, line 583:  Called install_qa_check
 *   misc-functions.sh, line 217:  Called source 'install_symlink_html_docs'
 *          05double-D, line  15:  Called DD_check
 *          05double-D, line  11:  Called die
 * The specific snippet of code:
 *              die "Aborting due to QA concerns: ${#files[@]} files installed in ${D%/}${D}"
 * 
 * If you need support, post the output of `emerge --info '=app-admin/testdisk-9999::overlay_jl'`,
 * the complete build log and the output of `emerge -pqv '=app-admin/testdisk-9999::overlay_jl'`.
 * The complete build log is located at '/var/tmp/portage/app-admin/testdisk-9999/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/app-admin/testdisk-9999/temp/environment'.
 * Working directory: '/var/tmp/portage/app-admin/testdisk-9999/image'
 * S: '/var/tmp/portage/app-admin/testdisk-9999/work/testdisk-9999'
!!! post install failed; exiting.
Comment 3 jospezial 2015-03-04 12:29:11 UTC
Created attachment 398022 [details, diff]
fix_rare_crash_when_listing_NTFS_directories.patch for 6.14

Here comes the fix!

fix rare crash when listing NTFS directories
http://git.cgsecurity.org/cgit/testdisk/commit/?id=a2676d349a975a142f1119c0aecb435e1b0db8b8

I tried to use the patch from there but that has to be adapted for apply.

I created a patch with diff between
the committed version of ntfs_dir.c
and
the ntfs_dir.c from 6.14
So there are a few other fixes in it.

The attached patch applies. (What a wonder!)
Ebuild merges fine.
Can't crash the program anymore.

Tried again without the patch and it crashes when listing the one of my two ntfs partitions.


diff -u /usr/portage/app-admin/testdisk/testdisk-6.14.ebuild testdisk-6.14.ebuild
--- /usr/portage/app-admin/testdisk/testdisk-6.14.ebuild        2014-12-30 21:01:02.000000000 +0100
+++ testdisk-6.14.ebuild        2015-03-01 18:41:37.155099183 +0100
@@ -27,6 +27,11 @@
                sys-libs/zlib"
 RDEPEND="!static? ( ${DEPEND} )"
 
+src_prepare() {
+
+       epatch "${FILESDIR}"/fix_rare_crash_when_listing_NTFS_directories.patch
+}
+
 src_configure() {
        local myconf
Comment 4 Nicolas Bock gentoo-dev 2015-04-22 02:40:34 UTC
@jospezial Could you confirm whether this is still a problem with testdisk-7.0? Thanks!
Comment 5 jospezial 2015-04-22 11:30:13 UTC
(In reply to Nicolas Bock from comment #4)
> @jospezial Could you confirm whether this is still a problem with
> testdisk-7.0? Thanks!

The bug with the segfault should be fixed since
http://git.cgsecurity.org/cgit/testdisk/commit/?id=a2676d349a975a142f1119c0aecb435e1b0db8b8
in 7.0 release because the patch I used for 6.14 was from upstream.

I will try to create a new live ebuild from 7.0 ebuild when I feel the need to.

Please add the patch to 6.14 and older if needed. We should get rid of the old versions after stabilizing 6.14 and 7.0.

Thx.
Comment 6 Nicolas Bock gentoo-dev 2015-04-22 12:54:30 UTC
Thanks for the info.
Comment 7 Nicolas Bock gentoo-dev 2015-04-24 15:24:51 UTC
I added testdisk-6.14-r1 to the tree which is using the patch you suggest. Please have a look.
Comment 8 Nicolas Bock gentoo-dev 2015-04-24 15:41:07 UTC
Closing.