Author: adam-guest
Date: 2008-04-08 08:54:04 +0000 (Tue, 08 Apr 2008)
New Revision: 1310

Modified:
   trunk/debian/changelog
   trunk/scripts/debsign.sh
Log:
  + Abort if the Format field of the .changes file is unsupported
    (greater than 1.8 or non-numeric)

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog      2008-04-08 08:15:23 UTC (rev 1309)
+++ trunk/debian/changelog      2008-04-08 08:54:04 UTC (rev 1310)
@@ -5,6 +5,8 @@
       introduced by dpkg 1.14.17 (Closes: #474749)
     + Abort if any unknown Checksums-* fields are found in the .changes
       file
+    + Abort if the Format field of the .changes file is unsupported
+      (greater than 1.8 or non-numeric)
 
  -- Adam D. Barratt <[EMAIL PROTECTED]>  Mon, 07 Apr 2008 19:57:25 +0100
 

Modified: trunk/scripts/debsign.sh
===================================================================
--- trunk/scripts/debsign.sh    2008-04-08 08:15:23 UTC (rev 1309)
+++ trunk/scripts/debsign.sh    2008-04-08 08:54:04 UTC (rev 1310)
@@ -380,8 +380,16 @@
                '" \$dsc_file=\"$dsc\"; \$dsc_md5=\"$dsc_md5\"; "'
                '" \$dsc_sha1=\"$dsc_sha1\"; \$dsc_sha256=\"$dsc_sha256\"; "'
                $dsc_size=(-s $dsc_file); ($dsc_base=$dsc_file) =~ s|.*/||;
-               $infiles=0; $insha1=0; $insha256=0;
+               $infiles=0; $insha1=0; $insha256=0; $format="";
                }
+               if(/^Format:\s+(.*)/) {
+                   $format=$1;
+                   die "Unrecognised .changes format: $format\n"
+                       unless $format =~ /^\d+(\.\d+)*$/;
+                   $format+=0;
+                   die "Unsupported .changes format: $format\n"
+                       if($format > 1.8);
+               }
                /^Files:/ && ($infiles=1,$insha1=0,$insha256=0);
                if(/^Checksums-Sha1:/) {$insha1=1;$infiles=0;$insha256=0;}
                elsif(/^Checksums-Sha256:/) {



-- 
To unsubscribe, send mail to [EMAIL PROTECTED]

Reply via email to