From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: Date: Thu, 13 Mar 2008 10:44:19 +0000 From: "roger peppe" To: "Fans of the OS Plan 9 from Bell Labs" <9fans@9fans.net> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: Subject: Re: [9fans] infrequent panics Topicbox-Message-UUID: 773c32ac-ead3-11e9-9d60-3106f5b1d025 > There's already something wrong here -- if spec contains bad > UTF then buf will overflow all the time. that's a good gotcha! i'd have naively assumed that sprint(buf, "%s", s) was equivalent to strcpy(buf, s). i wonder how many other bits of code are potentially broken because of this.