aboutsummaryrefslogtreecommitdiffstats
path: root/devel/sdl12
diff options
context:
space:
mode:
authornaddy <naddy@FreeBSD.org>2008-09-25 02:04:08 +0800
committernaddy <naddy@FreeBSD.org>2008-09-25 02:04:08 +0800
commit7e2147c9b99547c9c753a42f127875288d80e3d3 (patch)
treededa3eaa2fdeb2c79e7b1beec5cdcd250fcf4875 /devel/sdl12
parentf6de0fee7afc793dd21b16589271faf5e3c47f01 (diff)
downloadfreebsd-ports-gnome-7e2147c9b99547c9c753a42f127875288d80e3d3.tar.gz
freebsd-ports-gnome-7e2147c9b99547c9c753a42f127875288d80e3d3.tar.zst
freebsd-ports-gnome-7e2147c9b99547c9c753a42f127875288d80e3d3.zip
Fix a misaligned access crash when running on sparc64 and using a
remote X11 display. Approved by: maintainer Obtained from: upstream SVN
Diffstat (limited to 'devel/sdl12')
-rw-r--r--devel/sdl12/Makefile2
-rw-r--r--devel/sdl12/files/patch-src_video_x11_SDL__x11modes.c30
2 files changed, 31 insertions, 1 deletions
diff --git a/devel/sdl12/Makefile b/devel/sdl12/Makefile
index 4a6d67106b01..c174311ae5b1 100644
--- a/devel/sdl12/Makefile
+++ b/devel/sdl12/Makefile
@@ -7,7 +7,7 @@
PORTNAME= sdl
PORTVERSION= 1.2.13
-PORTREVISION= 1
+PORTREVISION= 2
PORTEPOCH= 2
CATEGORIES= devel
MASTER_SITES= http://www.libsdl.org/release/
diff --git a/devel/sdl12/files/patch-src_video_x11_SDL__x11modes.c b/devel/sdl12/files/patch-src_video_x11_SDL__x11modes.c
new file mode 100644
index 000000000000..cd2da197e17a
--- /dev/null
+++ b/devel/sdl12/files/patch-src_video_x11_SDL__x11modes.c
@@ -0,0 +1,30 @@
+--- src/video/x11/SDL_x11modes.c.orig
++++ src/video/x11/SDL_x11modes.c
+@@ -52,8 +52,25 @@
+ #if SDL_VIDEO_DRIVER_X11_VIDMODE
+ Bool SDL_NAME(XF86VidModeGetModeInfo)(Display *dpy, int scr, SDL_NAME(XF86VidModeModeInfo) *info)
+ {
+- SDL_NAME(XF86VidModeModeLine) *l = (SDL_NAME(XF86VidModeModeLine)*)((char*)info + sizeof info->dotclock);
+- return SDL_NAME(XF86VidModeGetModeLine)(dpy, scr, (int*)&info->dotclock, l);
++ Bool retval;
++ int dotclock;
++ SDL_NAME(XF86VidModeModeLine) l;
++ SDL_memset(&l, 0, sizeof(l));
++ retval = SDL_NAME(XF86VidModeGetModeLine)(dpy, scr, &dotclock, &l);
++ info->dotclock = dotclock;
++ info->hdisplay = l.hdisplay;
++ info->hsyncstart = l.hsyncstart;
++ info->hsyncend = l.hsyncend;
++ info->htotal = l.htotal;
++ info->hskew = l.hskew;
++ info->vdisplay = l.vdisplay;
++ info->vsyncstart = l.vsyncstart;
++ info->vsyncend = l.vsyncend;
++ info->vtotal = l.vtotal;
++ info->flags = l.flags;
++ info->privsize = l.privsize;
++ info->private = l.private;
++ return retval;
+ }
+ #endif /* SDL_VIDEO_DRIVER_X11_VIDMODE */
+