Bug#256335: Bug report logs - #247198 Bug #247198: /var/lib/defoma/scripts/pango.defoma: missing escaping of regex

Flavio Stanchina Flavio Stanchina <flavio.stanchina@tin.it>, 256335@bugs.debian.org
Sat, 26 Jun 2004 10:48:28 +0200


This is a multi-part message in MIME format.
--------------000000070607010104090207
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

Package: libpango1.0-common
Version: 1.4.0-4
Severity: normal
Tags: patch

Your fix to bug #247198 in pango1.0 version 1.2.5-5 doesn't actually fix 
the unquoted string that's giving me problems, but another similar case 
that I missed. I sent a mail to 247198@bugs.debian.org to that effect, 
see: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=247198

But the BTS didn't reopen the bug as I wanted. I likely made a mistake 
in my mail, I'm not proficient in using the BTS, then I forgot about 
this issue so the bug is now archived and I don't think it can be reopened.

A new, hopefully final, patch is attached. Please apply.

-- 
Ciao, Flavio


--------------000000070607010104090207
Content-Type: text/plain;
 name="pango.defoma.patch-v2"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="pango.defoma.patch-v2"

--- pango.defoma	2004-06-09 00:33:48.000000000 +0200
+++ pango.defoma-patch-v2	2004-05-10 11:56:06.000000000 +0200
@@ -72,25 +72,24 @@
 
 	foreach my $i (@cache) {
 		my $font = $Id->{1}->[$i];
-		my $enc;
+		my $enc = "$xe->{Foundry}-$xe->{Family}-$xe->{Encoding}";
 		$font =~ s/_/ /g;
 		$xe = get_xlfd_element ($font);
 		$xlfd = generate_xlfd ($xe);
 
 		if ($xe->{Weight} =~ /bold/ && ($xe->{Slant} eq 'o' || $xe->{Slant} eq 'i')) {
-			$enc = "$xe->{Foundry}-$xe->{Family}-$xe->{Encoding}";
 			push (@inbn_xlfd, $xlfd) if (!grep (/\Q$enc/, @inbn_xlfd));
 			next;
 		}
 		if ($xe->{Weight} !~ /bold/ && ($xe->{Slant} eq 'o' || $xe->{Slant} eq 'i')) {
-			push (@innn_xlfd, $xlfd) if (!grep (/$xe->{Foundry}-$xe->{Family}-$xe->{Encoding}/, @innn_xlfd));
+			push (@innn_xlfd, $xlfd) if (!grep (/\Q$enc/, @innn_xlfd));
 			next;
 		}
 		if ($xe->{Weight} =~ /bold/ && $xe->{Slant} =~ /r/) {
-			push (@nnbn_xlfd, $xlfd) if (!grep (/$xe->{Foundry}-$xe->{Family}-$xe->{Encoding}/, @nnbn_xlfd));
+			push (@nnbn_xlfd, $xlfd) if (!grep (/\Q$enc/, @nnbn_xlfd));
 			next;
 		}
-		push (@nnnn_xlfd, $xlfd) if (!grep (/$xe->{Foundry}-$xe->{Family}-$xe->{Encoding}/, @nnnn_xlfd));
+		push (@nnnn_xlfd, $xlfd) if (!grep (/\Q$enc/, @nnnn_xlfd));
 	}
 	return \(@nnnn_xlfd, @innn_xlfd, @nnbn_xlfd, @inbn_xlfd);
 }

--------------000000070607010104090207--