Fix decoding from positional argument while overriding output file

This commit is contained in:
Petr Písař 2013-01-23 13:23:15 +01:00
parent e3c867970d
commit b844ed00a2
2 changed files with 44 additions and 1 deletions

View File

@ -0,0 +1,36 @@
From 2e633b222dbdccfd04506a0c0028471feb101524 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
Date: Wed, 23 Jan 2013 13:15:18 +0100
Subject: [PATCH] Allow exactly one input file when specifying output file
This fixes regression in 4.13.3. The fix ported from 4.13.4pre2.
<https://bugzilla.redhat.com/show_bug.cgi?id=901895>
---
src/uudecode.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/uudecode.c b/src/uudecode.c
index 2ef5a92..723bcff 100644
--- a/src/uudecode.c
+++ b/src/uudecode.c
@@ -490,7 +490,7 @@ main (int argc, char const * const * argv)
exit_status = decode ("stdin");
break;
- case 1:
+ default:
if (HAVE_OPT(OUTPUT_FILE))
{
usage_message(_("You cannot specify an output file when processing\n\
@@ -499,7 +499,7 @@ multiple input files.\n"));
}
/* FALLTHROUGH */
- default:
+ case 1:
while (--argc >= 0)
{
char const * f = *(argv++);
--
1.8.1

View File

@ -1,11 +1,13 @@
Summary: The GNU shar utilities for packaging and unpackaging shell archives
Name: sharutils
Version: 4.13.3
Release: 1%{?dist}
Release: 2%{?dist}
License: GPLv3+ and LGPLv2+ and Public Domain
Group: Applications/Archiving
Source: ftp://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.xz
URL: http://www.gnu.org/software/%{name}/
# Bug #901895, in upstream 4.13.4pre2
Patch0: %{name}-4.13.3-Allow-exactly-one-input-file-when-specifying-output-.patch
BuildRequires: gettext
Requires(post): info
Requires(preun): info
@ -26,6 +28,7 @@ shar files.
%prep
%setup -q
%patch0 -p1 -b .input_count
# convert TODO, THANKS to UTF-8
for i in TODO THANKS; do
@ -65,6 +68,10 @@ fi
%{_mandir}/man5/*
%changelog
* Wed Jan 23 2013 Petr Pisar <ppisar@redhat.com> - 4.13.3-2
- Fix decoding from positional argument while overriding output file
(bug #901895)
* Mon Jan 07 2013 Petr Pisar <ppisar@redhat.com> - 4.13.3-1
- 4.13.3 bump