Bug#455901: Use of uninitialized value in substitution (s///) at /usr/bin/mytop line 958.

2008-04-21 Thread Dmitry E. Oboukhov
tags 455901 patch
thanks

see attache
--- mytop	2008-04-21 12:47:11.0 +0400
+++ mytop	2008-04-21 12:46:06.0 +0400
@@ -1,4 +1,7 @@
 #!/usr/bin/perl -w
+
+eval 'exec /usr/bin/perl -w -S $0 ${1+$@}'
+if 0; # not running under some shell
 #
 # $Id: mytop,v 1.53 2003/09/18 17:58:36 jzawodn Exp $
 
@@ -952,8 +955,11 @@
 {
 $thread-{Host} =~ s/:\d+$//;
 my $host = gethostbyaddr(inet_aton($thread-{Host}), AF_INET);
-$host =~ s/^([^.]+).*/$1/;
-$thread-{Host} = $host;
+if ($host)
+{
+  $host =~ s/^([^.]+).*/$1/;
+  $thread-{Host} = $host;
+}
 }
 
 ## Fix possible undefs


signature.asc
Description: Digital signature


Bug#455901: Use of uninitialized value in substitution (s///) at /usr/bin/mytop line 958.

2007-12-12 Thread Olaf van der Spek
Package: mytop
Version: 1.6-1
Severity: normal

Hi,

I get this error:
Use of uninitialized value in substitution (s///) at /usr/bin/mytop line 958.

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'stable'), (1, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.23-1-686 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages mytop depends on:
ii  libdbd-mysql-perl 4.005-1A Perl5 database interface to the 
ii  libdbi-perl   1.601-1Perl5 database interface by Tim Bu
ii  libterm-readkey-perl  2.30-3 A perl module for simple terminal 
ii  perl  5.8.8-12   Larry Wall's Practical Extraction 

mytop recommends no packages.

-- no debconf information



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