comparison src/evdev-plug/ed_ui.c @ 1170:96cc46b1cf5e trunk

[svn] - fix a possible allocation overflow issue. found while merging to 1.3 stable.
author nenolod
date Thu, 07 Jun 2007 08:28:08 -0700
parents 0cc6b35fbeb4
children 78861d8b86f2
comparison
equal deleted inserted replaced
1169:55703f60fd54 1170:96cc46b1cf5e
778 case EV_KEY: 778 case EV_KEY:
779 case EV_ABS: 779 case EV_ABS:
780 { 780 {
781 /* the trigger-dialog window is open; record input and 781 /* the trigger-dialog window is open; record input and
782 store it in a container managed by the trigger-dialog itself */ 782 store it in a container managed by the trigger-dialog itself */
783 ed_inputevent_t *dinputev = g_malloc(sizeof(ed_inputevent_t*)); 783 ed_inputevent_t *dinputev = g_malloc(sizeof(ed_inputevent_t));
784 dinputev->type = inputev.type; 784 dinputev->type = inputev.type;
785 dinputev->code = inputev.code; 785 dinputev->code = inputev.code;
786 dinputev->value = inputev.value; 786 dinputev->value = inputev.value;
787 g_object_set_data( G_OBJECT(trigger_dlg) , "trigger-data" , dinputev ); 787 g_object_set_data( G_OBJECT(trigger_dlg) , "trigger-data" , dinputev );
788 gtk_dialog_response( GTK_DIALOG(trigger_dlg) , GTK_RESPONSE_OK ); 788 gtk_dialog_response( GTK_DIALOG(trigger_dlg) , GTK_RESPONSE_OK );