diff options
author | pav <pav@FreeBSD.org> | 2009-06-26 19:25:37 +0800 |
---|---|---|
committer | pav <pav@FreeBSD.org> | 2009-06-26 19:25:37 +0800 |
commit | 9431b29f0e3264e48ca7567ad054aa12990d1fd2 (patch) | |
tree | 91683c37b4c54079869fd23b619276c8c4e4d1f5 /math/physcalc | |
parent | 35cabaa433a1cbb5c810f9fd3241f5951ca02feb (diff) | |
download | freebsd-ports-gnome-9431b29f0e3264e48ca7567ad054aa12990d1fd2.tar.gz freebsd-ports-gnome-9431b29f0e3264e48ca7567ad054aa12990d1fd2.tar.zst freebsd-ports-gnome-9431b29f0e3264e48ca7567ad054aa12990d1fd2.zip |
- The path to the .phy files was built up using un-zero'd memory, so it could
(and did, for me) break in strange and unexpected ways.
- EOF on input (e.g., ^D) would cause it to loop forever.
PR: ports/136060
Submitted by: Matthew D. Fuller <fullermd@over-yonder.net>
Diffstat (limited to 'math/physcalc')
-rw-r--r-- | math/physcalc/Makefile | 1 | ||||
-rw-r--r-- | math/physcalc/files/patch-ab | 6 | ||||
-rw-r--r-- | math/physcalc/files/patch-ac | 9 |
3 files changed, 9 insertions, 7 deletions
diff --git a/math/physcalc/Makefile b/math/physcalc/Makefile index b38a65469271..946e6c0c02c6 100644 --- a/math/physcalc/Makefile +++ b/math/physcalc/Makefile @@ -7,6 +7,7 @@ PORTNAME= physcalc PORTVERSION= 2.4 +PORTREVISION= 1 CATEGORIES= math MASTER_SITES= ftp://ftp.lightlink.com/pub/vulcan/ DISTNAME= ${PORTNAME} diff --git a/math/physcalc/files/patch-ab b/math/physcalc/files/patch-ab index ed9696eae996..179a6a6b4eac 100644 --- a/math/physcalc/files/patch-ab +++ b/math/physcalc/files/patch-ab @@ -1,5 +1,5 @@ ---- physconv.c Sun Aug 27 17:57:24 2000 -+++ physconv.c.new Sun Aug 27 18:03:58 2000 +--- physconv.c.orig 1998-08-30 15:58:16.000000000 -0500 ++++ physconv.c 2009-06-25 22:22:21.000000000 -0500 @@ -260,12 +260,16 @@ { /* read in lines from fp and do each as if typed from console */ FILE *fp; @@ -11,7 +11,7 @@ #endif - if ((fp = fopen(s,"r"))==NULL) { -+ fullpath = malloc( strlen( SHAREDIR ) + strlen( s ) + 1 ); ++ fullpath = calloc( strlen( SHAREDIR ) + strlen( s ) + 1, 1 ); + bcopy(SHAREDIR, fullpath, strlen(SHAREDIR)); + (void) strcat(fullpath, s); + if ((fp = fopen(fullpath,"r"))==NULL) { diff --git a/math/physcalc/files/patch-ac b/math/physcalc/files/patch-ac index 46131c9eff22..c76d57866f58 100644 --- a/math/physcalc/files/patch-ac +++ b/math/physcalc/files/patch-ac @@ -1,5 +1,5 @@ ---- physmain.c Sun Aug 27 17:55:04 2000 -+++ physmain.c.new Sun Aug 27 17:55:53 2000 +--- physmain.c.orig 1998-08-30 14:48:34.000000000 -0500 ++++ physmain.c 2009-06-25 22:32:46.000000000 -0500 @@ -227,7 +227,7 @@ printf("Replace %s = ",v->name); printexpr(v->value); @@ -9,12 +9,13 @@ printf("\n"); } else answer[0] = 'Y'; -@@ -711,7 +711,7 @@ +@@ -711,7 +711,8 @@ } else while (TRUE) { printf(">"); - gets(buf); -+ fgets(buf, sizeof(buf), stdin); ++ if(fgets(buf, sizeof(buf), stdin) == NULL) ++ exit(0); do_cmd(buf); } } |