Commit cfe00e57 authored by Rodrigo Moya's avatar Rodrigo Moya Committed by Rodrigo Moya
Browse files

guard against multiplying by -1 (when n_args is 0).

2006-01-04  Rodrigo Moya <rodrigo@novell.com>

	* gtk/gtkbindings.c (binding_signal_new): guard against multiplying
	by -1 (when n_args is 0).
parent 51517c1a
2006-01-04 Rodrigo Moya <rodrigo@novell.com>
* gtk/gtkbindings.c (binding_signal_new): guard against multiplying
by -1 (when n_args is 0).
2006-01-04 Michael Natterer <mitch@imendio.com> 2006-01-04 Michael Natterer <mitch@imendio.com>
* gtk/gtkmenutoolbutton.c * gtk/gtkmenutoolbutton.c
......
2006-01-04 Rodrigo Moya <rodrigo@novell.com>
* gtk/gtkbindings.c (binding_signal_new): guard against multiplying
by -1 (when n_args is 0).
2006-01-04 Michael Natterer <mitch@imendio.com> 2006-01-04 Michael Natterer <mitch@imendio.com>
* gtk/gtkmenutoolbutton.c * gtk/gtkmenutoolbutton.c
......
...@@ -65,7 +65,7 @@ binding_signal_new (const gchar *signal_name, ...@@ -65,7 +65,7 @@ binding_signal_new (const gchar *signal_name,
{ {
GtkBindingSignal *signal; GtkBindingSignal *signal;
signal = (GtkBindingSignal *) g_malloc0 (sizeof (GtkBindingSignal) + (n_args - 1) * sizeof (GtkBindingArg)); signal = (GtkBindingSignal *) g_malloc0 (sizeof (GtkBindingSignal) + (n_args > 0 ? n_args - 1 : 0) * sizeof (GtkBindingArg));
signal->next = NULL; signal->next = NULL;
signal->signal_name = (gchar *)g_intern_string (signal_name); signal->signal_name = (gchar *)g_intern_string (signal_name);
signal->n_args = n_args; signal->n_args = n_args;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment