From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22907 invoked by alias); 7 Jun 2016 17:03:28 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 38630 Received: (qmail 1416 invoked from network); 7 Jun 2016 17:03:25 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject :mime-version; bh=peNKTyvUIFD335nsRaP6xs4MBfEeRweNYIBpstr2tA0=; b=ELA+keAW3AUuarPmaOcq2v5aUnFN3FtlecOwWdci6FAWRJl4Pl4zZL4Pq6f69eAqlD tod5+QhjhPko7ri7udRbyv81cz0CRTEFu3Enyzvg8xH15aGtuxATkq9q9IDsa/y1tDZF NIKuFcY/p/YbDAHzlh2tmxYR0GhxtTE3iyaepFqDdRqu8yd1t8rT+eY8gnndlELJdsIx wAHrklNHAP7k6eoMB88Ckw6Jod4JdsbVnKHfm8OSrtF2fDco4LLBN2X2FgH6w2jSD6ek MSNXfBIdO3+msZCciZk/NW4fCdzgXGkp0ZVWwAKsqHmQRNph/msrt0+tRj9YgF62GoZJ 0aDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:message-id:date:in-reply-to:comments :references:to:subject:mime-version; bh=peNKTyvUIFD335nsRaP6xs4MBfEeRweNYIBpstr2tA0=; b=bqfQTJCuOBdvz9A/5Sxw2nkKr4bDpLrYQfUDmBnsn/136S1QE89Ub+O/iv2jUE014m 6o1xafacip4LaFVt0v8qPSyjtOmWxjz1pX4Vr63dh7eQC1VvhMnogw2wKcbm3DR8x8Cx q/pey0FPk3n+CDo229h0RcXeOYRMyA2n00q4NiO8sbtlSiYGphXF/kSIZwdm+Xc3L2JZ O9mmjBY2t3/8IJagmBsR7zNoH5lANaM8seZbicfJ5oZXSZbDkJ/sVXu2bs9oes/lKl5p XA5c9oFYtvdjQ/4gFYAKBcbXkZ8lnrp3bdwnjJLm3Ju2afdP93+3Pxyt/s+kfy2wFQA7 NkFg== X-Gm-Message-State: ALyK8tKJrT2TqKd5ubhnWs/bX0CI+eKO9lGyLOkGEdZ0WMBceVmLNTt1Vem1+3XcMzyROQ== X-Received: by 10.98.21.82 with SMTP id 79mr455934pfv.92.1465319002428; Tue, 07 Jun 2016 10:03:22 -0700 (PDT) From: Bart Schaefer Message-Id: <160607100329.ZM15469@torch.brasslantern.com> Date: Tue, 7 Jun 2016 10:03:29 -0700 In-Reply-To: <87fusprngk.fsf@gmail.com> Comments: In reply to Christian Neukirchen "Infinite loop with "hash ="" (Jun 7, 6:08pm) References: <87fusprngk.fsf@gmail.com> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-workers@zsh.org Subject: Re: Infinite loop with "hash =" MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Jun 7, 6:08pm, Christian Neukirchen wrote: } } Running "hash =" will trigger an infinite loop, even with the check } currently implemented. (Same for "hash =foo".) Hrmph, that's pretty silly. diff --git a/Src/builtin.c b/Src/builtin.c index 6f07fc6..c2fb81e 100644 --- a/Src/builtin.c +++ b/Src/builtin.c @@ -3748,6 +3748,7 @@ bin_hash(char *name, char **argv, Options ops, UNUSED(int func)) if (!(asg = getasg(&argv, NULL))) { zwarnnam(name, "bad assignment"); returnval = 1; + break; } else if (ASG_VALUEP(asg)) { if(isset(RESTRICTED)) { zwarnnam(name, "restricted: %s", asg->value.scalar);