SHA256
1
0
forked from pool/emacs
Dr. Werner Fink 2012-07-03 12:27:33 +00:00 committed by Git OBS Bridge
parent ef5f6488db
commit 89fa7df830
3 changed files with 51 additions and 0 deletions

43
emacs-24.1-xevent.patch Normal file
View File

@ -0,0 +1,43 @@
--- src/xmenu.c
+++ src/xmenu.c 2012-07-03 11:51:37.448009822 +0000
@@ -964,7 +964,7 @@ set_frame_menubar (FRAME_PTR f, int firs
{
deep_p = 1;
f->output_data.x->saved_menu_event = (XEvent*)xmalloc (sizeof (XEvent));
- f->output_data.x->saved_menu_event->type = 0;
+ memset(f->output_data.x->saved_menu_event,0,sizeof(XEvent));
}
#ifdef USE_GTK
--- src/xselect.c
+++ src/xselect.c 2012-07-03 11:08:10.732010284 +0000
@@ -2344,7 +2344,14 @@ x_fill_property_data (Display *dpy, Lisp
Lisp_Object o = XCAR (iter);
if (INTEGERP (o) || FLOATP (o) || CONSP (o))
- val = cons_to_signed (o, LONG_MIN, LONG_MAX);
+ {
+ if (INTEGERP (o) && (XFASTINT (o) > LONG_MAX || XFASTINT (o) < LONG_MIN))
+ val = (long) XFASTINT (o);
+ else if (FLOATP (o) && (XFLOAT_DATA (o) > LONG_MAX || XFLOAT_DATA (o) < LONG_MIN))
+ val = (long) XFLOAT_DATA (o);
+ else
+ val = cons_to_signed (o, LONG_MIN, LONG_MAX);
+ }
else if (STRINGP (o))
{
BLOCK_INPUT;
--- src/xterm.c
+++ src/xterm.c 2012-07-03 11:47:12.060510503 +0000
@@ -5753,9 +5753,10 @@ static struct x_display_info *next_noop_
#define SET_SAVED_BUTTON_EVENT \
do \
{ \
- if (f->output_data.x->saved_menu_event == 0) \
+ if (f->output_data.x->saved_menu_event == 0) { \
f->output_data.x->saved_menu_event \
= (XEvent *) xmalloc (sizeof (XEvent)); \
+ memset(f->output_data.x->saved_menu_event,0,sizeof(XEvent));}\
*f->output_data.x->saved_menu_event = event; \
inev.ie.kind = MENU_BAR_ACTIVATE_EVENT; \
XSETFRAME (inev.ie.frame_or_window, f); \

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Tue Jul 3 12:25:05 UTC 2012 - werner@suse.de
- Don't be fooled by not initialized time stamps of unused XEvent
structures which happens with old GTK-2.0
-------------------------------------------------------------------
Fri Jun 29 15:22:42 UTC 2012 - werner@suse.de

View File

@ -93,6 +93,7 @@ Patch14: emacs-24.1-tinfo.dif
Patch15: emacs-22.2-iconic.patch
Patch16: emacs-23.1-flyspell.patch
Patch22: emacs-24.1-bnc628268.patch
Patch23: emacs-24.1-xevent.patch
Patch24: emacs-24.1-xgselect.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%global bug_345669 0
@ -196,6 +197,7 @@ if test ! -e $HOME/.mh_profile && type -p install-mh > /dev/null 2>&1; then
install-mh -auto < /dev/null
fi
%patch22
%patch23
%patch24
%if 0%{?suse_version} < 1130
%patch1