Tue Jan 29 03:45:36 2008 UTC ()
Add two bug fixes from GIT (see patch headings for more info).
Bump rev.
(bjs)
diff -r1.6 -r1.7 pkgsrc/x11/libXi/Makefile
diff -r1.7 -r1.8 pkgsrc/x11/libXi/distinfo
diff -r0 -r1.3 pkgsrc/x11/libXi/patches/patch-aa
diff -r0 -r1.1 pkgsrc/x11/libXi/patches/patch-ab
--- pkgsrc/x11/libXi/Makefile 2007/09/21 19:28:47 1.6
+++ pkgsrc/x11/libXi/Makefile 2008/01/29 03:45:36 1.7
| @@ -1,17 +1,18 @@ | | | @@ -1,17 +1,18 @@ |
1 | # $NetBSD: Makefile,v 1.6 2007/09/21 19:28:47 bjs Exp $ | | 1 | # $NetBSD: Makefile,v 1.7 2008/01/29 03:45:36 bjs Exp $ |
2 | # | | 2 | # |
3 | | | 3 | |
4 | DISTNAME= libXi-1.1.3 | | 4 | DISTNAME= libXi-1.1.3 |
| | | 5 | PKGREVISION= 1 |
5 | CATEGORIES= x11 devel | | 6 | CATEGORIES= x11 devel |
6 | MASTER_SITES= http://xorg.freedesktop.org/releases/individual/lib/ | | 7 | MASTER_SITES= http://xorg.freedesktop.org/releases/individual/lib/ |
7 | EXTRACT_SUFX= .tar.bz2 | | 8 | EXTRACT_SUFX= .tar.bz2 |
8 | | | 9 | |
9 | MAINTAINER= joerg@NetBSD.org | | 10 | MAINTAINER= joerg@NetBSD.org |
10 | HOMEPAGE= http://xorg.freedesktop.org/ | | 11 | HOMEPAGE= http://xorg.freedesktop.org/ |
11 | COMMENT= X Input extension library | | 12 | COMMENT= X Input extension library |
12 | | | 13 | |
13 | PKG_INSTALLATION_TYPES= overwrite pkgviews | | 14 | PKG_INSTALLATION_TYPES= overwrite pkgviews |
14 | PKG_DESTDIR_SUPPORT= user-destdir | | 15 | PKG_DESTDIR_SUPPORT= user-destdir |
15 | | | 16 | |
16 | USE_LIBTOOL= yes | | 17 | USE_LIBTOOL= yes |
17 | GNU_CONFIGURE= yes | | 18 | GNU_CONFIGURE= yes |
--- pkgsrc/x11/libXi/distinfo 2007/09/21 20:47:14 1.7
+++ pkgsrc/x11/libXi/distinfo 2008/01/29 03:45:36 1.8
| @@ -1,5 +1,7 @@ | | | @@ -1,5 +1,7 @@ |
1 | $NetBSD: distinfo,v 1.7 2007/09/21 20:47:14 joerg Exp $ | | 1 | $NetBSD: distinfo,v 1.8 2008/01/29 03:45:36 bjs Exp $ |
2 | | | 2 | |
3 | SHA1 (libXi-1.1.3.tar.bz2) = 60608bcbebadc5fe0b51b5012e9301eb720988fe | | 3 | SHA1 (libXi-1.1.3.tar.bz2) = 60608bcbebadc5fe0b51b5012e9301eb720988fe |
4 | RMD160 (libXi-1.1.3.tar.bz2) = e6446f28a903eed54eccc5d4df685f9623942a0b | | 4 | RMD160 (libXi-1.1.3.tar.bz2) = e6446f28a903eed54eccc5d4df685f9623942a0b |
5 | Size (libXi-1.1.3.tar.bz2) = 248007 bytes | | 5 | Size (libXi-1.1.3.tar.bz2) = 248007 bytes |
| | | 6 | SHA1 (patch-aa) = 2bf138eb5f8fa4e9602579a6842278a7e5446fc5 |
| | | 7 | SHA1 (patch-ab) = 169dc342cb2631f10b9390568e9e39c91b595303 |
$NetBSD: patch-aa,v 1.3 2008/01/29 03:45:36 bjs Exp $
Coverity #743/744: Returned without freeing storage bufp/savp
If either bufp or savp failed to malloc, we returned without freeing
the other. (from GIT)
--- src/XGMotion.c.orig 2007-09-05 12:41:58.000000000 -0400
+++ src/XGMotion.c
@@ -115,6 +115,8 @@ Time stop;
savp = readp = (int *)Xmalloc(size);
bufp = (int *)Xmalloc(size2);
if (!bufp || !savp) {
+ Xfree(bufp);
+ Xfree(savp);
*nEvents = 0;
_XEatData(dpy, (unsigned long)size);
UnlockDisplay(dpy);
$NetBSD: patch-ab,v 1.1 2008/01/29 03:45:36 bjs Exp $
GetDeviceControl: calculate the length field correctly.
Length field should indicate the length of the struct in bytes,
not the length of the pointer to the struct. (from GIT)
--- src/XGetDCtl.c.orig 2007-09-05 12:41:58.000000000 -0400
+++ src/XGetDCtl.c
@@ -104,6 +104,12 @@ XGetDeviceControl(dpy, dev, control)
sav = d;
_XRead(dpy, (char *)d, nbytes);
+ /* In theory, we should just be able to use d->length to get the size.
+ * Turns out that a number of X servers (up to and including server
+ * 1.4) sent the wrong length value down the wire. So to not break
+ * apps that run against older servers, we have to calculate the size
+ * manually.
+ */
switch (d->control) {
case DEVICE_RESOLUTION:
{
@@ -170,7 +176,7 @@ XGetDeviceControl(dpy, dev, control)
XDeviceAbsCalibState *C = (XDeviceAbsCalibState *) Device;
C->control = DEVICE_ABS_CALIB;
- C->length = sizeof(C);
+ C->length = sizeof(XDeviceAbsCalibState);
C->min_x = c->min_x;
C->max_x = c->max_x;
C->min_y = c->min_y;
@@ -188,7 +194,7 @@ XGetDeviceControl(dpy, dev, control)
XDeviceAbsAreaState *A = (XDeviceAbsAreaState *) Device;
A->control = DEVICE_ABS_AREA;
- A->length = sizeof(A);
+ A->length = sizeof(XDeviceAbsAreaState);
A->offset_x = a->offset_x;
A->offset_y = a->offset_y;
A->width = a->width;
@@ -204,7 +210,7 @@ XGetDeviceControl(dpy, dev, control)
XDeviceCoreState *C = (XDeviceCoreState *) Device;
C->control = DEVICE_CORE;
- C->length = sizeof(C);
+ C->length = sizeof(XDeviceCoreState);
C->status = c->status;
C->iscore = c->iscore;