From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-io0-f169.google.com ([209.85.223.169]) by ur; Sun Aug 23 19:51:06 EDT 2015 Received: by iodt126 with SMTP id t126so131586187iod.2 for <9front@9front.org>; Sun, 23 Aug 2015 16:50:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:content-type:mime-version :content-transfer-encoding:subject:message-id:in-reply-to:references :user-agent:date:from:to; bh=HPQ3aKy4D40ILsJ9QPYTLIPL1teiRIJpTSGBQn8v72Q=; b=cBRUz2wjdKt0esTkrcANNa7OA6SJpduAZF01mmlXMCrEoOQVzvQs/yp232UaaskjDn rlzGx5V7K6WXPfwyzJELazgcowwG9enuPFRSVAMPppBMndT3G6iVpcEP3Zlu78g63cVS PzoAhsijTTd4mmaVLoFX4a2ymbA9vGhc3evnFJ00Y0MDfIY4Wl8pPLKD7MEETXvKOfdw /gLdxq5ZCsqOh6RwuaubpP+vz9ebq5SZWlu8MP9tyOiQEU3pXGl7n0Zxt6lwm98np7Rs DpXELvTh6CTaBQT4cSfHo5L/oFGsBupD/Z9CKhqo0wsT8i3Lba6Yg2kEHu0RUMJ8UKZM U5VA== X-Gm-Message-State: ALoCoQnQ2rS0HGXZ7u/wf6Ihyik3mcTcGHJ629XeIj9yWtt/ayNoPGG7kUUEBjnJ7TXc3k+IqchC X-Received: by 10.107.16.139 with SMTP id 11mr21345154ioq.122.1440373858130; Sun, 23 Aug 2015 16:50:58 -0700 (PDT) Return-Path: Received: from delta ([172.56.9.65]) by smtp.gmail.com with ESMTPSA id j3sm7767512ige.0.2015.08.23.16.50.56 for <9front@9front.org> (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 23 Aug 2015 16:50:57 -0700 (PDT) Received: from localhost (delta [local]) by delta (OpenSMTPD) with ESMTPA id 9cb6dc89 for <9front@9front.org>; Sun, 23 Aug 2015 23:50:44 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [PATCH 4 of 8] cwfs: use IOUNIT as MAXDAT, fix Msgbuf count overflow when MAXDAT > 2^15-1 X-Mercurial-Node: b7929f69bbb7120db5900fe38f717ccb433345fa X-Mercurial-Series-Index: 4 X-Mercurial-Series-Total: 8 Message-Id: List-ID: <9front.9front.org> X-Glyph: ➈ X-Bullshit: secure configuration scripting JSON over JSON module plugin X-Mercurial-Series-Id: <72294b856560ea15445f.1440373751@delta> In-Reply-To: References: User-Agent: Mercurial-patchbomb/3.3.2 Date: Sun, 23 Aug 2015 16:49:14 -0700 From: mischief To: 9front@9front.org # HG changeset patch # User mischief # Date 1440366687 25200 # Sun Aug 23 14:51:27 2015 -0700 # Node ID b7929f69bbb7120db5900fe38f717ccb433345fa # Parent 59420710e4e3a510c41f6c7d4047a144d5491b42 cwfs: use IOUNIT as MAXDAT, fix Msgbuf count overflow when MAXDAT > 2^15-1 diff -r 59420710e4e3 -r b7929f69bbb7 sys/src/cmd/cwfs/portdat.h --- a/sys/src/cmd/cwfs/portdat.h Sun Aug 23 14:51:27 2015 -0700 +++ b/sys/src/cmd/cwfs/portdat.h Sun Aug 23 14:51:27 2015 -0700 @@ -26,7 +26,7 @@ /* constants that don't affect disk layout */ enum { - MAXDAT = 8192, /* max allowable data message */ + MAXDAT = IOUNIT, /* max allowable data message */ MAXMSG = 128, /* max protocol message sans data */ MB = 1024*1024, @@ -459,7 +459,7 @@ struct Msgbuf { ulong magic; - short count; + int count; short flags; #define LARGE (1<<0) #define FREE (1<<1)