From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: To: 9fans@9fans.net Date: Fri, 20 May 2016 19:25:03 -0700 From: Skip Tavakkolian <9nut@9netics.com> In-Reply-To: <0e67f1b4649c79e017def200277bf72f@9netics.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: Re: [9fans] bug in authdial() Topicbox-Message-UUID: 9128369c-ead9-11e9-9d60-3106f5b1d025 i think this fix is correct; i'm not sure why tokenize didn't have a problem walking a buffer it expects to be null terminated. supermic% yesterday -d dial.c diff /n/dump/2016/0520/sys/src/libc/9sys/dial.c /sys/src/libc/9sys/dial.c 209a210 > int n; 211c212,213 < if (outstandingprocs(dp) && await(exitsts, sizeof exitsts) >= 0) { --- > if (outstandingprocs(dp) && (n = await(exitsts, sizeof exitsts)) >= 0) { > exitsts[n] = 0; supermic% > can you spot the problem in reap() function in /sys/src/libc/9sys/dial.c? > hint: in notedeath() there is a tokenize(exitsts, ...) > > static int > reap(Dest *dp) > { > char exitsts[2*ERRMAX]; > > if (outstandingprocs(dp) && await(exitsts, sizeof exitsts) >= 0) { > notedeath(dp, exitsts); > return 0; > } > return -1; > }