From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 9529 invoked from network); 13 Feb 2021 16:31:55 -0000 Received: from 1ess.inri.net (216.126.196.35) by inbox.vuxu.org with ESMTPUTF8; 13 Feb 2021 16:31:55 -0000 Received: from balrog.mythic-beasts.com ([46.235.227.24]) by 1ess; Sat Feb 13 11:25:39 -0500 2021 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=quintile.net; s=mythic-beasts-k1; h=Subject:To:Date:From; bh=naxF7dHbapbf8ldqi14zVmHmlDj2MiPlFnRh/0Zd0vw=; b=BTN0hO3vS5HHvuD969vGbgp0t6 V1ZGuUd/+2zTC2/rSRGb9rvV3p/LixYtFuwJRRemJEKw53O7sKhPtg/UEIV2fx2b6/CoD+/BE7No3 2EgCtqGOcNY+4tLvNxYOp8StfyLCZ/uTISyFY6aoOe2/LH310R8qEarD9JixzcFYSvtBnd6K8lFzI bnSfEWq87Hu6i9w2GHFfUHP9sA+6x5juHwv6Xsm/2mLgajGbwvI+uY3WtXwy715Z9e7hNI+D88H6n nQJCZ/NxO0cmXcKGFtUxh+zsP2ZkdgB/G32tWlgz1sowdPDejH4qplgNxoLAqDbf9ya4IC/zbAPvF WEBgWyjw==; Received: from [81.187.198.132] (port=52884 helo=quintile.net) by balrog.mythic-beasts.com with esmtpsa (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.92.3) (envelope-from ) id 1lAxjf-0007Xj-S7 for 9front@9front.org; Sat, 13 Feb 2021 16:25:36 +0000 Message-ID: <2d5ba311e52f92be0cd5574c95bab7aa@quintile.net> From: "Steve Simon" Date: Sat, 13 Feb 2021 16:25:23 +0000 To: 9front@9front.org In-Reply-To: <10CE4A9EC513CE5FC11B0B0D5006E7C8@eigenstate.org> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-BlackCat-Spam-Score: 0 List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: asynchronous generic TOR over ACPI CMS full-stack controller Subject: Re: [9front] sam input line length limits Reply-To: 9front@9front.org Precedence: bulk Normally I would be very wary of changing sam it has served me well for many years, but I am with you on this one, it has bitten me in the past and its annoying. Re the patch: I am being pedantic, I know, but for completeness... free(c) should come before the test for s == nil, as it could lead to a memory leak. reordering the code fractionally fixes it. c = Strtoc(&f->name); - sprint(buf, "%c%c%c %s\n", " '"[f->mod], + s = smprint("%c%c%c %s\n", " '"[f->mod], "-+"[f->rasp!=0], " ."[f==curfile], c); + if(s == nil) + error(Etoolong); free(c); changes to c = Strtoc(&f->name); - sprint(buf, "%c%c%c %s\n", " '"[f->mod], + s = smprint("%c%c%c %s\n", " '"[f->mod], "-+"[f->rasp!=0], " ."[f==curfile], c); free(c); + if(s == nil) + error(Etoolong);