mc 4.5.55 has a bug with zip support
Pavel Roskin
proski at gnu.org
Tue Jan 22 22:04:07 UTC 2002
Hello, Jari!
> I while ago I compiled & installed mc version 4.5.55 on Redhat 7.2 using
> this source package:
>
> http://rhcontrib.bero.org/RPMS/SRPMS/mc-4.5.55-1.src.rpm
Thank for the URL. I'll review the patches in that package. Most are
related to gmc (now removed from the sources), but some are for the text
edition.
> I have a simple shell script that I use to wgets stuff from certain
> webpages (mainly lecture notes, but that's not important). Now 'wget -m
> -np -nH' produces a directory named %7E<username>, where the %7E is
> obviously a replacement for the ~ character.
>
> I used zip to compress all those directories, and later tried to browse
> the contents of that zip file with mc. It displays those directories as
> 0.000000E+00<username> which indicates that mc probably mistakes the %7E's
> for a format string. Obviously unpacking (i.e. copying from the zip)
> doesn't work, too.
I could reproduce the problem. The problem in the uzip script.
Debugging shows that an unsafe printf is guilty. I'm applying the
following patch right now.
============================
--- ChangeLog
+++ ChangeLog
@@ -1 +1,6 @@
+2002-01-22 Pavel Roskin <proski at gnu.org>
+
+ * extfs/uzip: Fix unsafe printf.
+ Reported by Jari Karppinen <jakarppi at mail.student.oulu.fi>
+
2002-01-21 Pavel Roskin <proski at gnu.org>
--- extfs/uzip
+++ extfs/uzip
@@ -285,7 +285,8 @@
if ($platform ne 'unx') {
$perms = ($filename =~ /\/$/ ? 'drwxr-xr-x' : '-rw-r--r--');
}
- printf "%-10s 1 %-8d %-8d %8d $mon $day $year $hours:$mins $filename", $perms, $<, $(, $realsize;
+ printf "%-10s 1 %-8d %-8d %8d %s %s %s %s:%s %s", $perms, $<,
+ $(, $realsize, $mon, $day, $year, $hours, $mins, $filename;
if ($platform eq 'unx' && $perms =~ /^l/) {
my $linkdest = &get_link_destination($filename);
print " -> $linkdest";
============================
Copy is sent to Oskar Liljeblad <osk at hem.passagen.se>, author of uzip.
Jari, thank you for your bugreport!
--
Regards,
Pavel Roskin
More information about the mc-devel
mailing list