From a71cde075e950d51474112368dc837a421c3171e Mon Sep 17 00:00:00 2001 From: Jon Trulson Date: Fri, 26 Dec 2014 18:10:07 -0700 Subject: [PATCH] dtwm/WmFP: Coverity (memory corruption, moderate) --- cde/programs/dtwm/WmFP.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/cde/programs/dtwm/WmFP.c b/cde/programs/dtwm/WmFP.c index 22dcb638..bd7fe7c5 100644 --- a/cde/programs/dtwm/WmFP.c +++ b/cde/programs/dtwm/WmFP.c @@ -745,8 +745,6 @@ WmPanelistShow (Widget w) int i; Arg al[20]; int ac; - - /* Find the switch data for later processing */ @@ -785,16 +783,15 @@ WmPanelistShow (Widget w) if (shell_geometry == NULL) { Position x; - char geometry_buffer[32]; if (panel.element_values[PANEL_GEOMETRY].string_value != NULL) { - shell_geometry = panel.element_values[PANEL_GEOMETRY].parsed_value; + shell_geometry = panel.element_values[PANEL_GEOMETRY].parsed_value; } else { x = (screen_width > width) ? (Position)(screen_width - width) / 2 : 0; - sprintf (geometry_buffer, "+%d-0", x); + snprintf (geometry_buffer, 32 - 1, "+%d-0", x); shell_geometry = geometry_buffer; } -- 2.25.1