From owner-freebsd-ports-bugs@FreeBSD.ORG Wed Dec 29 00:50:21 2004 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AAD1616A4CE for ; Wed, 29 Dec 2004 00:50:21 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 79BE343D1D for ; Wed, 29 Dec 2004 00:50:21 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.1/8.13.1) with ESMTP id iBT0oLvB032395 for ; Wed, 29 Dec 2004 00:50:21 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.1/8.13.1/Submit) id iBT0oLRd032394; Wed, 29 Dec 2004 00:50:21 GMT (envelope-from gnats) Resent-Date: Wed, 29 Dec 2004 00:50:21 GMT Resent-Message-Id: <200412290050.iBT0oLRd032394@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Samy Al Bahra Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 599FE16A4CE for ; Wed, 29 Dec 2004 00:41:52 +0000 (GMT) Received: from www.freebsd.org (www.freebsd.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id 183DB43D2F for ; Wed, 29 Dec 2004 00:41:52 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.13.1/8.13.1) with ESMTP id iBT0fpE7088458 for ; Wed, 29 Dec 2004 00:41:51 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.13.1/8.13.1/Submit) id iBT0fpNQ088449; Wed, 29 Dec 2004 00:41:51 GMT (envelope-from nobody) Message-Id: <200412290041.iBT0fpNQ088449@www.freebsd.org> Date: Wed, 29 Dec 2004 00:41:51 GMT From: Samy Al Bahra To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-2.3 Subject: ports/75590: Fix security/stegdetect for 5.X X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Dec 2004 00:50:21 -0000 >Number: 75590 >Category: ports >Synopsis: Fix security/stegdetect for 5.X >Confidential: no >Severity: serious >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Dec 29 00:50:21 GMT 2004 >Closed-Date: >Last-Modified: >Originator: Samy Al Bahra >Release: >Organization: Kerneled.org >Environment: >Description: stegdetect does not compile on 5.X systems due to some antiqued C code. A patch follows that hacks the code into compilation and operation on 5.X systems. >How-To-Repeat: >Fix: diff -ruN stegdetect/Makefile stegdetect.patch/Makefile --- stegdetect/Makefile Wed Dec 29 02:47:34 2004 +++ stegdetect.patch/Makefile Wed Dec 29 03:37:18 2004 @@ -35,10 +35,6 @@ .include -.if ${OSVERSION} >= 502126 -BROKEN= "Does not compile on FreeBSD >= 5.x" -.endif - post-patch: ${REINPLACE_CMD} 's/$$(JPEGLIB)/$$(JPEGLIB) -lcrypto/' \ ${WRKSRC}/Makefile.in diff -ruN stegdetect/files/patch-break_jsteg.c stegdetect.patch/files/patch-break_jsteg.c --- stegdetect/files/patch-break_jsteg.c Thu Jan 1 03:00:00 1970 +++ stegdetect.patch/files/patch-break_jsteg.c Wed Dec 29 03:33:47 2004 @@ -0,0 +1,11 @@ +--- break_jsteg.c Fri Dec 21 01:11:32 2001 ++++ /tmp/break_jsteg.c.diff Wed Dec 29 03:32:38 2004 +@@ -162,7 +162,7 @@ + jstegob->skip = bytes - sizeof(jstegob->coeff); + + if (jsbits < max || off + jsbits > bits) { +- warnx(__FUNCTION__": bad size in bits, %d", bits); ++ warnx("break_jsteg_prepare: bad size in bits, %d", bits); + return (NULL); + } + diff -ruN stegdetect/files/patch-common.c stegdetect.patch/files/patch-common.c --- stegdetect/files/patch-common.c Thu Jan 1 03:00:00 1970 +++ stegdetect.patch/files/patch-common.c Wed Dec 29 03:35:31 2004 @@ -0,0 +1,47 @@ +--- common.c Tue Jan 22 19:25:38 2002 ++++ common.c.diff Wed Dec 29 03:35:11 2004 +@@ -85,7 +85,7 @@ + + if (datasrc->bytes_in_buffer == 0) { + if (! (*datasrc->fill_input_buffer) (cinfo)) +- err(1, __FUNCTION__": fill_input"); ++ err(1, "jpeg_getc: fill_input"); + } + datasrc->bytes_in_buffer--; + return GETJOCTET(*datasrc->next_input_byte++); +@@ -297,7 +297,7 @@ + + dcts = malloc(bits * sizeof (short)); + if (dcts == NULL) { +- warn(__FUNCTION__": malloc"); ++ warn("prepare_all: malloc"); + return (-1); + } + +@@ -362,7 +362,7 @@ + if (pdcts != NULL) { + dcts = malloc(bits * sizeof (short)); + if (dcts == NULL) { +- warn(__FUNCTION__": malloc"); ++ warn("prepare_normal: malloc"); + return (-1); + } + } +@@ -410,7 +410,7 @@ + /* XXX - wasteful */ + back[comp] = calloc(off, sizeof (char)); + if (back[comp] == NULL) { +- warn(__FUNCTION__": calloc"); ++ warn("prepare_jphide: calloc"); + goto err; + } + } +@@ -418,7 +418,7 @@ + if (pdcts != NULL) { + dcts = malloc(mbits * sizeof (short)); + if (dcts == NULL) { +- warn(__FUNCTION__": malloc"); ++ warn("prepare_jphide: malloc"); + goto err; + } + } diff -ruN stegdetect/files/patch-stegdetect.c stegdetect.patch/files/patch-stegdetect.c --- stegdetect/files/patch-stegdetect.c Thu Jan 1 03:00:00 1970 +++ stegdetect.patch/files/patch-stegdetect.c Wed Dec 29 03:35:57 2004 @@ -0,0 +1,29 @@ +--- stegdetect.c Sat Jan 26 23:51:16 2002 ++++ /tmp/stegdetect.c.diff Wed Dec 29 03:32:38 2004 +@@ -1198,7 +1198,7 @@ + flag = 1; + strlcat(outbuf, " f5(***)", sizeof(outbuf)); + +- no_f5: ++ no_f5:; + } + + if (scans & FLAG_DOINVIS) { +@@ -1237,7 +1237,7 @@ + strlcat(outbuf, tmp, sizeof(outbuf)); + } + +- no_invisiblesecrets: ++ no_invisiblesecrets:; + } + + if ((scans & FLAG_CHECKHDRS)) { +@@ -1301,7 +1301,7 @@ + } + + free(dcts); +- jsteg_error: ++ jsteg_error:; + } + + if ((scans & FLAG_DOOUTGUESS) && prepare_normal(&dcts, &bits) != -1) { >Release-Note: >Audit-Trail: >Unformatted: