"mcopy" does not translate some filename

Bug #600915 reported by b00n
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
mtools (Ubuntu)
New
Undecided
Unassigned

Bug Description

Binary package hint: mtools

Running on 10.04 freshly updated.

$ apt-cache policy mtools
mtools:
  Installed: 4.0.10-1ubuntu1
  Candidate: 4.0.10-1ubuntu1
  Version table:
 *** 4.0.10-1ubuntu1 0
        500 http://us.archive.ubuntu.com/ubuntu/ lucid/main Packages
        100 /var/lib/dpkg/status

What I expected: "mcopy" would "mangle" Linux filenames as needed so they would work on fat32.

What happened: error messages, directories not created, ordinary file not created, "mcopy" crashes.

More details:

The mtools info says it will translate some special characters to underscores if the target file system does not support them. Copying from ext4 to fat32, I get error messages from mcopy that look like untranslated characters:

$ mcopy -b -s -p -m -D a -D A ~/Music/* /media/1B08-461A/MUSIC/
mkdir: Invalid argument
Failure to make directory /media/1B08-461A/MUSIC//Alex de Grassi/Turning: Turning Back
mkdir: Invalid argument
Failure to make directory /media/1B08-461A/MUSIC//Alison Krauss/Now That I've Found You: A Collection
mkdir: Invalid argument
Failure to make directory /media/1B08-461A/MUSIC//Art of Noise/(Who's Afraid Of?) The Art of Noise!
mkdir: Invalid argument
Failure to make directory /media/1B08-461A/MUSIC//Berghoff, Indictor, Garafalo, Indictor, Kahane, Tepp, Zack
Can't open /media/1B08-461A/MUSIC//Crash Test Dummies/God Shuffled His Feet/8 - How Does a Duck Know?.ogg: Invalid argument

I'm not sure if this is related, but it looks like this might ultimately lead to a crash:

*** stack smashing detected ***: mcopy terminated
======= Backtrace: =========
/lib/tls/i686/cmov/libc.so.6(__fortify_fail+0x50)[0xaf7390]
/lib/tls/i686/cmov/libc.so.6(+0xe233a)[0xaf733a]
mcopy[0x8058360]
[0x61206469]
======= Memory map: ========
003ca000-003e5000 r-xp 00000000 08:01 573 /lib/ld-2.11.1.so
003e5000-003e6000 r--p 0001a000 08:01 573 /lib/ld-2.11.1.so
003e6000-003e7000 rw-p 0001b000 08:01 573 /lib/ld-2.11.1.so
004bc000-004bd000 r-xp 00000000 00:00 0 [vdso]
00596000-005b3000 r-xp 00000000 08:01 892 /lib/libgcc_s.so.1
005b3000-005b4000 r--p 0001c000 08:01 892 /lib/libgcc_s.so.1
005b4000-005b5000 rw-p 0001d000 08:01 892 /lib/libgcc_s.so.1
00a15000-00b68000 r-xp 00000000 08:01 289041 /lib/tls/i686/cmov/libc-2.11.1.so
00b68000-00b69000 ---p 00153000 08:01 289041 /lib/tls/i686/cmov/libc-2.11.1.so
00b69000-00b6b000 r--p 00153000 08:01 289041 /lib/tls/i686/cmov/libc-2.11.1.so
00b6b000-00b6c000 rw-p 00155000 08:01 289041 /lib/tls/i686/cmov/libc-2.11.1.so
00b6c000-00b6f000 rw-p 00000000 00:00 0
00f93000-00fa6000 r-xp 00000000 08:01 289049 /lib/tls/i686/cmov/libnsl-2.11.1.so
00fa6000-00fa7000 r--p 00012000 08:01 289049 /lib/tls/i686/cmov/libnsl-2.11.1.so
00fa7000-00fa8000 rw-p 00013000 08:01 289049 /lib/tls/i686/cmov/libnsl-2.11.1.so
00fa8000-00faa000 rw-p 00000000 00:00 0
08048000-0806e000 r-xp 00000000 08:01 1498 /usr/bin/mtools
0806e000-0806f000 r--p 00025000 08:01 1498 /usr/bin/mtools
0806f000-08070000 rw-p 00026000 08:01 1498 /usr/bin/mtools
08070000-08072000 rw-p 00000000 00:00 0
088e7000-08908000 rw-p 00000000 00:00 0 [heap]
b774d000-b778c000 r--p 00000000 08:01 3542367 /usr/lib/locale/en_US.utf8/LC_CTYPE
b778c000-b78aa000 r--p 00000000 08:01 3542368 /usr/lib/locale/en_US.utf8/LC_COLLATE
b78aa000-b78ac000 rw-p 00000000 00:00 0
b78ac000-b78ad000 r--p 00000000 08:01 3568279 /usr/lib/locale/en_US.utf8/LC_NUMERIC
b78ad000-b78ae000 r--p 00000000 08:01 3542406 /usr/lib/locale/en_US.utf8/LC_TIME
b78ae000-b78af000 r--p 00000000 08:01 3542407 /usr/lib/locale/en_US.utf8/LC_MONETARY
b78af000-b78b0000 r--p 00000000 08:01 3542408 /usr/lib/locale/en_US.utf8/LC_MESSAGES/SYS_LC_MESSAGES
b78b0000-b78b1000 r--p 00000000 08:01 3568285 /usr/lib/locale/en_US.utf8/LC_PAPER
b78b1000-b78b2000 r--p 00000000 08:01 3568286 /usr/lib/locale/en_US.utf8/LC_NAME
b78b2000-b78b3000 r--p 00000000 08:01 3542409 /usr/lib/locale/en_US.utf8/LC_ADDRESS
b78b3000-b78b4000 r--p 00000000 08:01 3542410 /usr/lib/locale/en_US.utf8/LC_TELEPHONE
b78b4000-b78b5000 r--p 00000000 08:01 3568289 /usr/lib/locale/en_US.utf8/LC_MEASUREMENT
b78b5000-b78bc000 r--s 00000000 08:01 288675 /usr/lib/gconv/gconv-modules.cache
b78bc000-b78bd000 r--p 00000000 08:01 3542411 /usr/lib/locale/en_US.utf8/LC_IDENTIFICATION
b78bd000-b78bf000 rw-p 00000000 00:00 0
bfd4a000-bfd6f000 rw-p 00000000 00:00 0 [stack]
Aborted

Tags: mcopy mtools
Revision history for this message
b00n (ub-0003) wrote :

Crash repeats on another file with '?' in the filename.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.