summaryrefslogtreecommitdiff
path: root/x11/libX11/patches
diff options
context:
space:
mode:
authorjoerg <joerg>2007-07-12 15:01:59 +0000
committerjoerg <joerg>2007-07-12 15:01:59 +0000
commitf042d65524a89107b72b0667be1b7095d3ec372f (patch)
tree3bc84d78a8498fa61fc61a7775a67e0c06a3be83 /x11/libX11/patches
parentba959c281a7903f370455e3876823c7a99d57783 (diff)
downloadpkgsrc-f042d65524a89107b72b0667be1b7095d3ec372f.tar.gz
Update do libX11-1.1.2. Major changes include:
- fixed integer overflows [ patched before ] - fixed file descriptor leak - allow re-entrant Xlib calls from _XIOError for the sake of atexit handlers or ELF/C++ destructors - define XTHREADLIB and XTHREAD_CFLAGS [ not perfect, but used for now ] - Many constness and some 64bit issues fixed - Added man apge for XKB Add a NetBSD xsrc patch to unlock mutexes before destroying them.
Diffstat (limited to 'x11/libX11/patches')
-rw-r--r--x11/libX11/patches/patch-aa87
-rw-r--r--x11/libX11/patches/patch-ab20
2 files changed, 20 insertions, 87 deletions
diff --git a/x11/libX11/patches/patch-aa b/x11/libX11/patches/patch-aa
deleted file mode 100644
index fe29a91c12d..00000000000
--- a/x11/libX11/patches/patch-aa
+++ /dev/null
@@ -1,87 +0,0 @@
-$NetBSD: patch-aa,v 1.1 2007/04/03 20:28:38 drochner Exp $
-
---- src/ImUtil.c.orig 2007-04-03 19:08:57.000000000 +0200
-+++ src/ImUtil.c
-@@ -327,12 +327,13 @@ XImage *XCreateImage (dpy, visual, depth
- {
- register XImage *image;
- int bits_per_pixel = 1;
-+ int min_bytes_per_line;
-
- if (depth == 0 || depth > 32 ||
- (format != XYBitmap && format != XYPixmap && format != ZPixmap) ||
- (format == XYBitmap && depth != 1) ||
- (xpad != 8 && xpad != 16 && xpad != 32) ||
-- offset < 0 || image_bytes_per_line < 0)
-+ offset < 0)
- return (XImage *) NULL;
- if ((image = (XImage *) Xcalloc(1, (unsigned) sizeof(XImage))) == NULL)
- return (XImage *) NULL;
-@@ -363,16 +364,21 @@ XImage *XCreateImage (dpy, visual, depth
- /*
- * compute per line accelerator.
- */
-- if (image_bytes_per_line == 0)
- {
- if (format == ZPixmap)
-- image->bytes_per_line =
-+ min_bytes_per_line =
- ROUNDUP((bits_per_pixel * width), image->bitmap_pad);
- else
-- image->bytes_per_line =
-+ min_bytes_per_line =
- ROUNDUP((width + offset), image->bitmap_pad);
- }
-- else image->bytes_per_line = image_bytes_per_line;
-+ if (image_bytes_per_line == 0) {
-+ image->bytes_per_line = min_bytes_per_line;
-+ } else if (image_bytes_per_line < min_bytes_per_line) {
-+ return 0;
-+ } else {
-+ image->bytes_per_line = image_bytes_per_line;
-+ }
-
- image->bits_per_pixel = bits_per_pixel;
- image->obdata = NULL;
-@@ -384,7 +390,11 @@ XImage *XCreateImage (dpy, visual, depth
- Status XInitImage (image)
- XImage *image;
- {
-+ int min_bytes_per_line;
-+
- if (image->depth == 0 || image->depth > 32 ||
-+ image->bits_per_pixel > 32 || image->bitmap_unit > 32 ||
-+ image->bits_per_pixel < 0 || image->bitmap_unit < 0 ||
- (image->format != XYBitmap &&
- image->format != XYPixmap &&
- image->format != ZPixmap) ||
-@@ -392,21 +402,24 @@ Status XInitImage (image)
- (image->bitmap_pad != 8 &&
- image->bitmap_pad != 16 &&
- image->bitmap_pad != 32) ||
-- image->xoffset < 0 || image->bytes_per_line < 0)
-+ image->xoffset < 0)
- return 0;
-
- /*
- * compute per line accelerator.
- */
-- if (image->bytes_per_line == 0)
-- {
- if (image->format == ZPixmap)
-- image->bytes_per_line =
-+ min_bytes_per_line =
- ROUNDUP((image->bits_per_pixel * image->width),
- image->bitmap_pad);
- else
-- image->bytes_per_line =
-+ min_bytes_per_line =
- ROUNDUP((image->width + image->xoffset), image->bitmap_pad);
-+
-+ if (image->bytes_per_line == 0) {
-+ image->bytes_per_line = min_bytes_per_line;
-+ } else if (image->bytes_per_line < min_bytes_per_line) {
-+ return 0;
- }
-
- _XInitImageFuncPtrs (image);
diff --git a/x11/libX11/patches/patch-ab b/x11/libX11/patches/patch-ab
new file mode 100644
index 00000000000..a0d6e6a4ee4
--- /dev/null
+++ b/x11/libX11/patches/patch-ab
@@ -0,0 +1,20 @@
+$NetBSD: patch-ab,v 1.1 2007/07/12 15:02:09 joerg Exp $
+
+--- src/Xrm.c.orig 2006-09-25 12:57:47.000000000 +0200
++++ src/Xrm.c
+@@ -808,6 +808,7 @@ void XrmCombineDatabase(
+ }
+ }
+ (from->methods->destroy)(from->mbstate);
++ _XUnlockMutex(&from->linfo);
+ _XFreeMutex(&from->linfo);
+ Xfree((char *)from);
+ _XUnlockMutex(&(*into)->linfo);
+@@ -2656,6 +2657,7 @@ void XrmDestroyDatabase(
+ else
+ DestroyNTable(table);
+ }
++ _XUnlockMutex(&db->linfo);
+ _XFreeMutex(&db->linfo);
+ (*db->methods->destroy)(db->mbstate);
+ Xfree((char *)db);