ports/117912: [patch]chines/hanzim: Fix segmentation fault caused by strcmp none exist variable
Sunry Chen
sunrychen at gmail.com
Thu Nov 8 09:20:02 UTC 2007
>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 at 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 at FreeBSD.org
+MAINTAINER= sunrychen at 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:
More information about the freebsd-ports-bugs
mailing list