[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Request to unblock ircmarkers/0.12-1



Hi,

yesterday, I uploaded ircmarkers 0.12-1 to unstable. The diff is fairly small,
and I'd like to request the inclusion of that version in testing.

The --help output mixed up latitude and longitude, and because of that a user
triggered a segfault that was caused by all markers being outside of the
(wrongly specified) visible map area. This patch fixes the --help output,
catches the segfault, and print a warning in the case all markers are
invisible.

Thanks for considering. (Please Cc: me in replies, I'm not subscribed.)


--- /home/cb/tmp/gxyE5hqYvM/ircmarkers-0.11/debian/changelog    2006-12-21 18:26:56.890792560 +0100
+++ /home/cb/tmp/BBI7cKdQRM/ircmarkers-0.12/debian/changelog    2006-12-21 18:26:57.138754864 +0100
@@ -1,3 +1,12 @@
+ircmarkers (0.12-1) unstable; urgency=low
+
+  * Fix segfault when all markers are outside the visible area, and print
+    warning in that case.
+  * The -x and -y documentation was mixed up in the --help output.
+    Spotted by Andreas Gockel.
+
+ -- Christoph Berg <myon@debian.org>  Wed, 20 Dec 2006 16:08:28 +0100
+
 ircmarkers (0.11-1) unstable; urgency=low
 
   * Support Maidenhead (QTH) locator format.
diff -Nru /home/cb/tmp/gxyE5hqYvM/ircmarkers-0.11/ircmarkers /home/cb/tmp/BBI7cKdQRM/ircmarkers-0.12/ir
cmarkers
--- /home/cb/tmp/gxyE5hqYvM/ircmarkers-0.11/ircmarkers  2006-11-03 17:52:36.000000000 +0100
+++ /home/cb/tmp/BBI7cKdQRM/ircmarkers-0.12/ircmarkers  2006-12-20 15:24:48.000000000 +0100
@@ -32,8 +32,8 @@
 usage: $0 [options] config [inputmap outputmap]
 -q             be quiet
 -o command     configuration command
--x west/east   latitude bounds of input map
--y south/north longitude bounds of input map
+-x west/east   longitude bounds of input map
+-y south/north latitude bounds of input map
 EOT
        exit 0;
 }
@@ -150,11 +150,15 @@
 }
 
 if($config->{markers}) {
+       my $visible;
        foreach my $marker (@{$config->{markers}}) {
                next unless $marker->{visible};
+               $visible = 1;
                $config->labelsize($marker);
                $map->draw_dot_new($marker);
        }
+       print "warning: all markers are outside the visible area\n"
+               unless $visible or $config->{quiet};
        $map->compute_overlap() if($config->{overlap_correction});
        foreach my $marker (@{$config->{markers}}) {
                next unless $marker->{visible};
diff -Nru /home/cb/tmp/gxyE5hqYvM/ircmarkers-0.11/overlap.c /home/cb/tmp/BBI7cKdQRM/ircmarkers-0.12/ove
rlap.c
--- /home/cb/tmp/gxyE5hqYvM/ircmarkers-0.11/overlap.c   2006-02-22 01:44:19.000000000 +0100
+++ /home/cb/tmp/BBI7cKdQRM/ircmarkers-0.12/overlap.c   2006-12-20 14:36:06.000000000 +0100
@@ -207,8 +207,7 @@
             assert(nm);
             markers = nm;
         }
-        if (15 !=
-            scanf("%u\t%u\t%u\t%d\t%d\t%d\t%d\t%d\t%d\t%d\t%d\t%d\t%d\t%d\t%d\n",
+        i = scanf("%u\t%u\t%u\t%d\t%d\t%d\t%d\t%d\t%d\t%d\t%d\t%d\t%d\t%d\t%d\n",
                 &(markers[nb_markers].id),
                 &(markers[nb_markers].x),
                 &(markers[nb_markers].y),
@@ -223,8 +222,9 @@
                 &(markers[nb_markers].txt.top),
                 &(markers[nb_markers].txt.bottom),
                 &(markers[nb_markers].txt.width),
-                &(markers[nb_markers].txt.height)))
-            assert(0);
+                &(markers[nb_markers].txt.height));
+        if (i == -1) continue;
+        if (i != 15) assert(0);
 #ifdef DEBUG
         markers[nb_markers].orig_txt_x = markers[nb_markers].txt.left;
         markers[nb_markers].orig_txt_y = markers[nb_markers].txt.bottom;


Christoph
-- 
cb@df7cb.de | http://www.df7cb.de/

Attachment: signature.asc
Description: Digital signature


Reply to: