From: John Darrington Date: Sun, 21 Jun 2015 06:10:46 +0000 (+0200) Subject: PsppireOutputView redefined parameter y to be of type long. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=68a0247ad78ed77de1f4b3a96a734fd6c2994984;p=pspp PsppireOutputView redefined parameter y to be of type long. The variable y was defined as int, but being cast to long when set in the tree store. This seems like it could give rise to integer overflow. This change redefines y to be of type long. Possibly related to bug #45272 --- diff --git a/src/ui/gui/psppire-output-view.c b/src/ui/gui/psppire-output-view.c index 83029959cf..93afbd6035 100644 --- a/src/ui/gui/psppire-output-view.c +++ b/src/ui/gui/psppire-output-view.c @@ -54,7 +54,7 @@ struct psppire_output_view GtkLayout *output; int render_width; int max_width; - int y; + glong y; struct string_map render_opts; GtkTreeView *overview; @@ -371,7 +371,7 @@ psppire_output_view_put (struct psppire_output_view *view, gtk_tree_store_set (store, &iter, COL_NAME, ds_cstr (&name), COL_ADDR, item, - COL_Y, (glong)(view->y), + COL_Y, (view->y), -1); ds_destroy (&name);