zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <p.stephenson@samsung.com>
To: Zsh Hackers' List <zsh-workers@zsh.org>
Subject: Re: PATCH: safe numeric import
Date: Thu, 02 Oct 2014 17:06:31 +0100	[thread overview]
Message-ID: <20141002170631.155a88a1@pwslap01u.europe.root.pri> (raw)
In-Reply-To: <20140929110420.52cc66f8@pwslap01u.europe.root.pri>

On Mon, 29 Sep 2014 11:04:20 +0100
Peter Stephenson <p.stephenson@samsung.com> wrote:
> OK, how about this?  When we're doing the import, all numbers, integer
> or floating point, are imported straight, without an evaluation.

Here's a test --- I confirmed this does wayward things with old
versions of the shell.

diff --git a/Test/C01arith.ztst b/Test/C01arith.ztst
index 25cd8b8..4c55b96 100644
--- a/Test/C01arith.ztst
+++ b/Test/C01arith.ztst
@@ -282,3 +282,7 @@
   print $(( [#_] (5. ** 10) / 16. ))
 0:Grouping output with underscores: floating point
 >610_351.562_5
+
+  env SHLVL=1+RANDOM $ZTST_testdir/../Src/zsh -f -c 'print $SHLVL'
+0:Imported integer functions are not evaluated
+>2

pws


      parent reply	other threads:[~2014-10-02 16:06 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-24 14:45 zsh seems to be vulnerable to CVE-2014-6271: remote code execution through bash İsmail Dönmez
2014-09-24 14:54 ` Frank Terbeck
2014-09-24 14:55   ` İsmail Dönmez
2014-09-24 15:01   ` Peter Stephenson
2014-09-24 15:08     ` Frank Terbeck
2014-09-24 15:13     ` Jérémie Roquet
2014-09-24 14:55 ` Jérémie Roquet
2014-09-24 14:59 ` Chet Ramey
2014-09-25 13:11 ` Peter Stephenson
2014-09-26 14:03   ` Oliver Kiddle
2014-09-26 20:08     ` Peter Stephenson
2014-09-29 10:04       ` PATCH: safe numeric import Peter Stephenson
2014-09-29 15:24         ` Bart Schaefer
2014-10-01 14:57         ` [Bulk] " Oliver Kiddle
2014-10-02 16:06         ` Peter Stephenson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20141002170631.155a88a1@pwslap01u.europe.root.pri \
    --to=p.stephenson@samsung.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).