dtwm/WmFP: Coverity (memory corruption, moderate)
This commit is contained in:
@@ -745,8 +745,6 @@ WmPanelistShow (Widget w)
|
|||||||
int i;
|
int i;
|
||||||
Arg al[20];
|
Arg al[20];
|
||||||
int ac;
|
int ac;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* Find the switch data for later processing */
|
/* Find the switch data for later processing */
|
||||||
|
|
||||||
@@ -785,16 +783,15 @@ WmPanelistShow (Widget w)
|
|||||||
if (shell_geometry == NULL)
|
if (shell_geometry == NULL)
|
||||||
{
|
{
|
||||||
Position x;
|
Position x;
|
||||||
char geometry_buffer[32];
|
|
||||||
|
|
||||||
if (panel.element_values[PANEL_GEOMETRY].string_value != NULL)
|
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
|
else
|
||||||
{
|
{
|
||||||
x = (screen_width > width) ? (Position)(screen_width - width) / 2 : 0;
|
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;
|
shell_geometry = geometry_buffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user