summary refs log tree commit diff
path: root/gnu/packages/patches/sdl-pango-blit_overflow.patch
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2020-01-03 17:20:27 +0100
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2020-02-02 14:20:28 +0100
commitf389c65dbbc4ed1802707aba709bef01bd315895 (patch)
treea9b3eb8cff74296989c87259d6743819276f5358 /gnu/packages/patches/sdl-pango-blit_overflow.patch
parent2a2da78326e80dabba2d02afa790f487e85df3e4 (diff)
downloadguix-f389c65dbbc4ed1802707aba709bef01bd315895.tar.gz
gnu: Add sdl-pango.
* gnu/packages/sdl.scm (sdl-pango): New variable.
* gnu/packages/patches/sdl-pango-api_additions.patch: New file.
* gnu/packages/patches/sdl-pango-blit_overflow.patch: New file.
* gnu/packages/patches/sdl-pango-fillrect_crash.patch: New file.
* gnu/packages/patches/sdl-pango-fix-explicit-SDLPango_CopyFTBitmapToSurface.patch:
New file.
* gnu/packages/patches/sdl-pango-matrix_declarations.patch: New file.
* gnu/packages/patches/sdl-pango-sans-serif.patch: New file.
* gnu/local.mk (sdl-pango): Reference patches.

add
Diffstat (limited to 'gnu/packages/patches/sdl-pango-blit_overflow.patch')
-rw-r--r--gnu/packages/patches/sdl-pango-blit_overflow.patch32
1 files changed, 32 insertions, 0 deletions
diff --git a/gnu/packages/patches/sdl-pango-blit_overflow.patch b/gnu/packages/patches/sdl-pango-blit_overflow.patch
new file mode 100644
index 0000000000..411d066a74
--- /dev/null
+++ b/gnu/packages/patches/sdl-pango-blit_overflow.patch
@@ -0,0 +1,32 @@
+Index: sdlpango-0.1.2/src/SDL_Pango.c
+===================================================================
+--- sdlpango-0.1.2.orig/src/SDL_Pango.c	2007-10-08 19:44:15.000000000 +0000
++++ sdlpango-0.1.2/src/SDL_Pango.c	2007-10-08 19:45:27.000000000 +0000
+@@ -725,16 +725,23 @@
+     int x = rect->x;

+     int y = rect->y;

+ 

++    if(x < 0) {

++	width += x; x = 0;

++    }

+     if(x + width > surface->w) {

+ 	width = surface->w - x;

+-	if(width <= 0)

+-	    return;

++    }

++    if(width <= 0)

++	return;

++

++    if(y < 0) {

++	height += y; y = 0;

+     }

+     if(y + height > surface->h) {

+ 	height = surface->h - y;

+-	if(height <= 0)

+-	    return;

+     }

++    if(height <= 0)

++	return;

+ 

+     if(SDL_LockSurface(surface)) {

+ 	SDL_SetError("surface lock failed");