From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from primenet.com.au (ns1.primenet.com.au [203.24.36.2]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id e84f1f20 for ; Mon, 28 Oct 2019 11:51:27 +0000 (UTC) Received: (qmail 16282 invoked by alias); 28 Oct 2019 11:51:22 -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: List-Unsubscribe: X-Seq: 44875 Received: (qmail 212 invoked by uid 1010); 28 Oct 2019 11:51:22 -0000 X-Qmail-Scanner-Diagnostics: from mail-il1-f179.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.102.0/25615. spamassassin: 3.4.2. Clear:RC:0(209.85.166.179):SA:0(-2.0/5.0):. Processed in 4.605206 secs); 28 Oct 2019 11:51:22 -0000 X-Envelope-From: mikachu@gmail.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.166.179 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=4oq6+paFGHzZCteA1yV171rooE6xuvbwF+JKmDCrjvY=; b=cDRhm0+1ER+FalneA4aMlrdvu99BH6wBLEwhKafmubz2Ap95xCuR+NQHZmeCeRdv67 j+EHCiMQxn160IlIIfdo/k1Kagou+qujKp8bEQwUGCXCP++q2pR2YM+uXOIDeivHO14W 0w00fYbnt1cY3EqxRQDpmhCMY92tG3HhRMpw2F7Dy8wm+KRL3HJ1xobI/aUA8sdgBtiV N4b/imrVBmAO6e8/Vkbb7p+Y8AhoSs5yTJ61+vw/oNhF0m57WYoxYLk0gkwb6z9oNsgk FvfuHpFpY3oGhYE8Tobr8nemy9l+JmbkAZOiF4jFGPKRD5/6V0opoFU+Rc6fB6ZsQOfO fyWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=4oq6+paFGHzZCteA1yV171rooE6xuvbwF+JKmDCrjvY=; b=J/rk3Ix074xE/Sxd01PqfzOohE5AYn+Uoo9RdIy7EYNoiQZ5Bg6c1XCMhSMHlW1c8/ 6/b6U+dIVpS8BZ8pOCcWG2re5mtaZmy1Cu87zE++ctN10Wo8cfyK7sDjdIXDC5iIBufx sZOG1mnBiDUpbbu6HW7stMDa08y3/y7DXmRRnrQIVldQFeyPipjRM2Jo75w+ePrUQw0R nP6KwX8N+Szr6XQ6w/m8Fgnpdyhx82sBu+oi6d0PCxLDnI4L6IIQ/ScPl+SIhALeWIgZ 4Sh9uUIoVSz4XQaCGvXzaI2LlyFcUg3Dd2rJI5+5gZ/vnoqTf8HK+46sy8KyRBbzz9sJ mqeg== X-Gm-Message-State: APjAAAU13GUbF9M0OVzH0zqMWxpqplQLL4pHlj9Rc+u5G4z4oACDJMLM bFZROCiDzpCxgUmbfrwDXbDiUDLRrYYhoTdLVWU= X-Google-Smtp-Source: APXvYqzcB+KoP0LqpsoC0QKvt+B2vhsCN0VdUHlIw6r+iHATpa7mO1iK/MUuK+nyrvRecDJXE/AmV97PpLcy7RxKFh4= X-Received: by 2002:a92:de48:: with SMTP id e8mr18723672ilr.219.1572263444722; Mon, 28 Oct 2019 04:50:44 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: From: Mikael Magnusson Date: Mon, 28 Oct 2019 12:50:43 +0100 Message-ID: Subject: Re: PATCH: fix a memory leak and potential heap corruption when rotating lines To: Roman Perepelitsa Cc: Zsh hackers list Content-Type: text/plain; charset="UTF-8" On 10/28/19, Roman Perepelitsa wrote: > I've bumped into this code accidentally while trying to do something > unrelated. It looks wrong to me although there is a good chance I'm > misreading it. I'm attaching a patch that either fixes two bugs, > introduces two new bugs, or does something in between. I'll appreciate > if someone more experienced can take a look at it. > > All test pass with this patch and my zsh seems to work fine. I haven't > verified that this code actually runs either during testing or when > I'm using zsh normally. Did you accidentally sent a reversed patch? That line has been --olnct since the initial cvs revision. -- Mikael Magnusson