OpenPKG CVS Repository
http://cvs.openpkg.org/
____________________________________________________________________________
Server: cvs.openpkg.org Name: Ralf S. Engelschall
Root: /v/openpkg/cvs Email: [EMAIL PROTECTED]
Module: openpkg-src Date: 04-Sep-2007 10:26:57
Branch: HEAD Handle: 2007090409265600
Added files:
openpkg-src/gawk gawk.patch
Modified files:
openpkg-src/gawk gawk.spec
Log:
Fix coredump while running with nonexistent files (via FreeBSD ports)
Summary:
Revision Changes Path
1.1 +29 -0 openpkg-src/gawk/gawk.patch
1.40 +3 -1 openpkg-src/gawk/gawk.spec
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: openpkg-src/gawk/gawk.patch
============================================================================
$ cvs diff -u -r0 -r1.1 gawk.patch
--- /dev/null 2007-09-04 10:26:47 +0200
+++ gawk.patch 2007-09-04 10:26:57 +0200
@@ -0,0 +1,29 @@
+Fix coredump while running with nonexistent files (via FreeBSD ports)
+
+Index: io.c
+--- io.c.orig 2005-07-26 20:07:43 +0200
++++ io.c 2007-09-04 10:24:29 +0200
+@@ -2480,9 +2480,12 @@
+ {
+ struct stat sbuf;
+ struct open_hook *oh;
++ int iop_malloced = FALSE;
+
+- if (iop == NULL)
++ if (iop == NULL) {
+ emalloc(iop, IOBUF *, sizeof(IOBUF), "iop_alloc");
++ iop_malloced = TRUE;
++ }
+ memset(iop, '\0', sizeof(IOBUF));
+ iop->flag = 0;
+ iop->fd = fd;
+@@ -2495,7 +2498,8 @@
+ }
+
+ if (iop->fd == INVALID_HANDLE) {
+- free(iop);
++ if (iop_malloced)
++ free(iop);
+ return NULL;
+ }
+ if (isatty(iop->fd))
@@ .
patch -p0 <<'@@ .'
Index: openpkg-src/gawk/gawk.spec
============================================================================
$ cvs diff -u -r1.39 -r1.40 gawk.spec
--- openpkg-src/gawk/gawk.spec 1 Jan 2007 17:37:58 -0000 1.39
+++ openpkg-src/gawk/gawk.spec 4 Sep 2007 08:26:56 -0000 1.40
@@ -33,10 +33,11 @@
Group: Language
License: GPL
Version: 3.1.5
-Release: 20061013
+Release: 20070904
# list of sources
Source0: ftp://ftp.gnu.org/gnu/gawk/gawk-%{version}.tar.gz
+Patch0: gawk.patch
# build information
Prefix: %{l_prefix}
@@ -65,6 +66,7 @@
%prep
%setup -q
+ %patch -p0
%build
CC="%{l_cc}" \
@@ .
______________________________________________________________________
OpenPKG http://openpkg.org
CVS Repository Commit List [email protected]