[GRASS-SVN] r74442 - grass/trunk/raster/r.thin

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Apr 30 11:26:10 PDT 2019


Author: mmetz
Date: 2019-04-30 11:26:10 -0700 (Tue, 30 Apr 2019)
New Revision: 74442

Modified:
   grass/trunk/raster/r.thin/thin_lines.c
Log:
r.thin: avoid integer overflow, remove unused variable

Modified: grass/trunk/raster/r.thin/thin_lines.c
===================================================================
--- grass/trunk/raster/r.thin/thin_lines.c	2019-04-30 18:14:24 UTC (rev 74441)
+++ grass/trunk/raster/r.thin/thin_lines.c	2019-04-30 18:26:10 UTC (rev 74442)
@@ -26,7 +26,6 @@
 #define false 0
 #define DELETED_PIX   9999
 
-static char *work_file_name;
 static int n_rows, n_cols, pad_size;
 static int box_right, box_left, box_top, box_bottom;
 
@@ -37,7 +36,8 @@
 {
     int j, i, col, deleted, row;
     CELL *row_buf, *new_med, *med, *bottom, *top, *get_a_row();
-    char W, N_W, Templ[8], N_Templ[8];
+    char W, N_W;
+    unsigned char Templ[8], N_Templ[8];
 
     map_size(&n_rows, &n_cols, &pad_size);
     box_right = box_bottom = 0;
@@ -63,7 +63,6 @@
 	put_a_row(row, bottom);
     }				/* row-loop */
     if (box_right < box_left || box_bottom < box_top) {
-	unlink(work_file_name);
 	G_fatal_error(_("Unable to find bounding box for lines"));
     }
     G_message(_("Bounding box:  l = %d, r = %d, t = %d, b = %d"),



More information about the grass-commit mailing list