Package: needrestart / 3.4-5~bpo9+1

05-strip-leading-zeroes.diff Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
From 017c9a11d9a3961477ed79200b2bce8963483575 Mon Sep 17 00:00:00 2001
From: Thomas Liske <thomas@fiasko-nw.net>
Date: Fri, 3 May 2019 22:28:21 +0200
Subject: [PATCH] [Core] Remove leading zero before testing in map_files
 (Debian Bug#928225 by Alexander Galanin <al@galanin.nnov.ru>).

---
 needrestart | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/needrestart b/needrestart
index 2fc3379..ed18920 100755
--- a/needrestart
+++ b/needrestart
@@ -504,6 +504,8 @@ if(defined($opt_l)) {
 
 		    # check for outdated lib mappings
 		    unless($nrconf{skip_mapfiles} == 1) {
+			$maddr =~ s/^0+([^-])/$1/;
+			$maddr =~ s/-0+(.)/-$1/;
 			my @paths = ("/proc/$pid/map_files/$maddr", "/proc/$pid/root/$path");
 			my ($testp) = grep { -e $_; } @paths;
 			unless($testp) {