Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 8 Nov 2007 09:11:45 GMT
From:      Sunry Chen <sunrychen@gmail.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/117912: [patch]chines/hanzim: Fix segmentation fault caused by strcmp none exist variable
Message-ID:  <200711080911.lA89Bjuh001881@www.freebsd.org>
Resent-Message-ID: <200711080920.lA89K1mA006232@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         117912
>Category:       ports
>Synopsis:       [patch]chines/hanzim: Fix segmentation fault caused by strcmp none exist variable
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Nov 08 09:20:01 UTC 2007
>Closed-Date:
>Last-Modified:
>Originator:     Sunry Chen
>Release:        FreeBSD 6.2-STABLE i386
>Organization:
Shenzhen Institute of Technology
>Environment:
FreeBSD www.525183.com 6.2-STABLE FreeBSD 6.2-STABLE #8: Tue Sep 18 23:01:05 CST 2007 hplc@www.525183.com:/usr/obj/usr/src/sys/MYKERNEL i386

>Description:
Segmentation fault caused by strcmp none exist variable.
>How-To-Repeat:
Just run it without any option.
>Fix:
Judge if there's option before strcmp it.

Patch attached with submission follows:

diff -ruN hanzim.orig/Makefile hanzim/Makefile
--- hanzim.orig/Makefile	2007-11-08 15:57:27.000000000 +0800
+++ hanzim/Makefile	2007-11-08 16:10:14.000000000 +0800
@@ -10,11 +10,14 @@
 PORTVERSION=	1.3
 PORTREVISION=	2
 CATEGORIES=	chinese tk84
-MASTER_SITES=	http://kamares.ucsd.edu/~arobert/Files/Chinese/
+MASTER_SITES=	http://kamares.ucsd.edu/~arobert/Files/Chinese/ \
+		http://www.525183.com/freebsd/hanzim/ \
+		http://www.chinatinco.com/freebsd/hanzim/ \
+		http://525183.serverbox.org/freebsd/hanzim/
 MASTER_SITE_SUBDIR=	. Old
 EXTRACT_SUFX=	.tgz
 
-MAINTAINER=	ports@FreeBSD.org
+MAINTAINER=	sunrychen@gmail.com
 COMMENT=	A Chinese character learning-aid program
 
 BUILD_DEPENDS+=	wish8.4:${PORTSDIR}/x11-toolkits/tk84
diff -ruN hanzim.orig/files/patch-hanzim.c hanzim/files/patch-hanzim.c
--- hanzim.orig/files/patch-hanzim.c	2007-11-08 15:57:27.000000000 +0800
+++ hanzim/files/patch-hanzim.c	2007-11-08 16:36:52.000000000 +0800
@@ -1,11 +1,11 @@
---- hanzim.c.orig	Wed Mar 20 01:34:31 2002
-+++ hanzim.c	Sat Jun 14 09:20:04 2003
+--- ./hanzim.c.orig	2002-03-20 14:34:31.000000000 +0800
++++ ./hanzim.c	2007-11-08 16:33:14.000000000 +0800
 @@ -204,6 +204,16 @@
  main(int argc, char *argv[]) {
    Tcl_Interp *interp;
  
 +/* hanzim need a running XFree to do its initial setup, rectify */
-+  if (!(strcmp(argv[1], "-port-install")))
++  if (argc>1 && !(strcmp(argv[1], "-port-install")))
 +  {
 +        char *portdatadir = "%%PREFIX%%/lib/hanzim";
 +        init_vars(portdatadir);


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200711080911.lA89Bjuh001881>