unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
blob 411d066a74e9316f56162cbfa80a9b374346f827 778 bytes (raw)
name: packages/patches/sdl-pango-blit_overflow.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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");

debug log:

solving 411d066a74e9316f56162cbfa80a9b374346f827 ...
found 411d066a74e9316f56162cbfa80a9b374346f827 in https://git.savannah.gnu.org/cgit/guix.git

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).