Package: libsvn-mirror-perl
Version: 0.68-1
Severity: minor
Tags: patch

*** Please type your report below this line ***
Typing `C-d' at a password prompt provokes a used-uninitialized warning.
However, the first time I saw this I didn't actually type Ctrl-D,
but rather simply typed `C-x C-q' from emacs to see what an attempt
to commit would provoke here.

Reproduce like this, typing Ctrl-D at the prompt:

  $ svk co svn://svn.clkao.org/svk/trunk svk-trunk
  $ cd svk-trunk/lib/SVK
  $ echo foo > Util.pm
  $ svk ci -m. Util.pm
  Commit into mirrored path: merging back directly.
  Merging back to mirror source svn://svn.clkao.org/svk/trunk.
  Authentication realm: <svn://svn.clkao.org:3690> svk repository
  Password for 'meyering':
  Authentication realm: <svn://svn.clkao.org:3690> svk repository
  Username: Use of uninitialized value in chomp at 
/usr/share/perl5/SVN/Mirror/Ra.pm line 284.
  Password for '':

Here's a patch (to /usr/share/perl5/SVN/Mirror/Ra.pm) that also
fixes the same problem a few lines above, in _ssl_client_cert_prompt:

        * Ra.pm (_ssl_client_cert_prompt, _username_prompt): Test for
        undefined before using `chomp'.

--- /t/Ra.pm    2005-12-30 16:30:28.000000000 +0100
+++ /t/Ra.pm    2006-02-19 09:10:02.217108426 +0100
@@ -262,7 +262,9 @@ sub _ssl_client_cert_prompt {
     my ($cred, $realm, $may_save, $pool) = @_;
 
     print "Client certificate filename: ";
-    chomp(my $filename = <STDIN>);
+    my $filename = <STDIN>;
+    $filename = '' unless defined $filename;
+    chomp $filename;
     $cred->cert_file($filename);
 
     return OK;
@@ -281,8 +283,9 @@ sub _username_prompt {
 
     print "Authentication realm: $realm\n" if defined $realm and length $realm;
     print "Username: ";
-    chomp(my $username = <STDIN>);
+    my $username = <STDIN>;
     $username = '' unless defined $username;
+    chomp $username;
 
     $cred->username($username);
 

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'stable')
Architecture: amd64 (x86_64)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.15-1-amd64-k8
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages libsvn-mirror-perl depends on:
ii  libclass-accessor-perl      0.22-1       Automated accessor generator
ii  libfile-chdir-perl          0.06-1       A more sensible way to change dire
ii  libsvn-core-perl            1.2.3dfsg1-3 perl bindings for Subversion (aka.
ii  libsvn-simple-perl          0.27-1       A simple interface for writing a d
ii  libterm-readkey-perl        2.30-3       A perl module for simple terminal 
ii  libtimedate-perl            1.1600-5     Time and date functions for Perl
ii  liburi-perl                 1.35-1       Manipulates and accesses URI strin
ii  perl                        5.8.8-2      Larry Wall's Practical Extraction 

libsvn-mirror-perl recommends no packages.

-- no debconf information


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to