From mboxrd@z Thu Jan 1 00:00:00 1970 From: erik quanstrom Date: Mon, 13 Jan 2014 18:54:57 -0500 To: 9fans@9fans.net Message-ID: <45cd5ef279b7595da9771d7d494c7311@coraid.com> In-Reply-To: <2e748c14611ecd8e653a1865598e418d@felloff.net> References: <2e748c14611ecd8e653a1865598e418d@felloff.net> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: Re: [9fans] devdraw memory corruption Topicbox-Message-UUID: b2c8a562-ead8-11e9-9d60-3106f5b1d025 > +++ /sys/src/9/port/devdraw.c Mon Jan 13 23:22:13 2014 UTC > @@ -1187,10 +1187,11 @@ > error(Enodrawimage); > i = di->image; > } > - n = > sprint(a, "%11d %11d %11s %11d %11d %11d %11d %11d %11d %11d %11d %11d ", > + n = > sprint(a, "%11d %11d %11s %11d %11d %11d %11d %11d %11d %11d %11d %11d", > cl->clientid, cl->infoid, chantostr(buf, i->chan), > (i->flags&Frepl)==Frepl, > i->r.min.x, i->r.min.y, i->r.max.x, i->r.max.y, > i->clipr.min.x, i->clipr.min.y, i->clipr.max.x, i->clipr.max.y); > + ((char*)a)[n++] = ' '; > cl->infoid = -1; > break; why not use a 145 byte buffer and readstr? - erik