zsh-workers
 help / color / mirror / code / Atom feed
* PATCH: 3.1.5 - Small Src/ patches that were overlooked
@ 1998-10-31 10:13 Bart Schaefer
  1998-10-31 15:21 ` Peter Stephenson
  1998-11-02  9:15 ` Zefram
  0 siblings, 2 replies; 3+ messages in thread
From: Bart Schaefer @ 1998-10-31 10:13 UTC (permalink / raw)
  To: zsh-workers

Fix whitespace in builtins.c.

My patch from zsh-workers/4421 for restore_params() segfault.

PWS's patch from zsh-workers/4250 to regenerate signal names on reconfigure.

Goran Larsson's patch from zsh-workers/4105 to nul-terminate a string in
the stat module.

Index: Src/builtin.c
===================================================================
diff -u -r1.1.1.2 builtin.c
--- builtin.c	1998/10/30 15:57:01	1.1.1.2
+++ builtin.c	1998/10/31 09:03:10
@@ -2627,14 +2627,14 @@
     if(opch == ':' || !(p = memchr(optstr, opch, lenoptstr))) {
 	p = "?";
 err:
-      zsfree(zoptarg);
+	zsfree(zoptarg);
 	if(quiet) {
 	    setsparam(var, ztrdup(p));
 	    zoptarg = metafy(optbuf, lenoptbuf, META_DUP);
 	} else {
 	    zerr(*p == '?' ? "bad option: -%c" :
 		"argument expected after -%c option", NULL, opch);
-          zoptarg=ztrdup("");
+	    zoptarg=ztrdup("");
 	    errflag = 0;
 	}
 	return 0;
Index: Src/exec.c
===================================================================
diff -u -r1.1.1.2 -r1.6
--- exec.c	1998/10/30 15:57:02	1.1.1.2
+++ exec.c	1998/10/30 17:52:43	1.6
@@ -1992,8 +1992,8 @@
 		}
 	    } else
 		paramtab->addnode(paramtab, pm->nam, pm);
-	    if (pm->flags & PM_EXPORTED)
-		pm->env = addenv(pm->nam, getsparam(pm->nam));
+	    if ((pm->flags & PM_EXPORTED) && ((s = getsparam(pm->nam))))
+		pm->env = addenv(pm->nam, s);
 	}
     }
 }
Index: Src/zsh.mdd
===================================================================
diff -u -r1.1.1.2 -r1.3
--- zsh.mdd	1998/10/30 15:57:08	1.1.1.2
+++ zsh.mdd	1998/10/30 17:52:47	1.3
@@ -12,7 +12,7 @@
 prototypes.h hashtable.h ztype.h"
 
 :<<\Make
-signames.c: signames.awk @SIGNAL_H@
+signames.c: signames.awk ../config.h @SIGNAL_H@
 	$(AWK) -f $(sdir)/signames.awk @SIGNAL_H@ > $@
 
 sigcount.h: signames.c
Index: Src/Modules/stat.c
===================================================================
diff -u -r1.1.1.2 -r1.3
--- stat.c	1998/10/30 15:57:11	1.1.1.2
+++ stat.c	1998/10/30 17:52:47	1.3
@@ -85,6 +85,7 @@
 
 	for (i = 1; i <= 9; i++)
 	    pm[i] = (mode & *mfp++) ? modes[i] : '-';
+	pm[10] = '\0';
 
 	if (mode & S_ISUID)
 	    pm[3] = (mode & S_IXUSR) ? 's' : 'S';

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: PATCH: 3.1.5 - Small Src/ patches that were overlooked
  1998-10-31 10:13 PATCH: 3.1.5 - Small Src/ patches that were overlooked Bart Schaefer
@ 1998-10-31 15:21 ` Peter Stephenson
  1998-11-02  9:15 ` Zefram
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Stephenson @ 1998-10-31 15:21 UTC (permalink / raw)
  To: Zsh hackers list

"Bart Schaefer" wrote:
> Goran Larsson's patch from zsh-workers/4105 to nul-terminate a string in
> the stat module.

This isn't actually necessary: you'll see that pm[10] now gets set to
zero, just in a different place from where Goran's patch put it.

-- 
Peter Stephenson <pws@ibmth.df.unipi.it>       Tel: +39 050 844536
WWW:  http://www.ifh.de/~pws/
Dipartimento di Fisica, Via Buonarotti 2, 56100 Pisa, Italy


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: PATCH: 3.1.5 - Small Src/ patches that were overlooked
  1998-10-31 10:13 PATCH: 3.1.5 - Small Src/ patches that were overlooked Bart Schaefer
  1998-10-31 15:21 ` Peter Stephenson
@ 1998-11-02  9:15 ` Zefram
  1 sibling, 0 replies; 3+ messages in thread
From: Zefram @ 1998-11-02  9:15 UTC (permalink / raw)
  To: Bart Schaefer; +Cc: zsh-workers

Bart Schaefer wrote:
>My patch from zsh-workers/4421 for restore_params() segfault.

I want to know more about this before including the patch.  There should
never be a NULL pointer there, so the real bug is in whatever is adding
a NULL to that list.  Can you reproduce the bug?

-zefram


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1998-11-02  9:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-10-31 10:13 PATCH: 3.1.5 - Small Src/ patches that were overlooked Bart Schaefer
1998-10-31 15:21 ` Peter Stephenson
1998-11-02  9:15 ` Zefram

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).