From: David du Colombier <0intro@gmail.com> Date: Tue, 12 May 2015 14:54:39 +0000 (+0200) Subject: runtime: terminate exit status buffer on Plan 9 X-Git-Tag: go1.5beta1~629 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=7de86a1b1c7f145cb574796dce6992fb12c91381;p=gostls13.git runtime: terminate exit status buffer on Plan 9 The status buffer built by the exit function was not nil-terminated. Fixes #10789. Change-Id: I2d34ac50a19d138176c4b47393497ba7070d5b61 Reviewed-on: https://go-review.googlesource.com/9953 Reviewed-by: Brad Fitzpatrick Run-TryBot: Brad Fitzpatrick --- diff --git a/src/runtime/os1_plan9.go b/src/runtime/os1_plan9.go index c026218241..1aae96a999 100644 --- a/src/runtime/os1_plan9.go +++ b/src/runtime/os1_plan9.go @@ -177,7 +177,7 @@ func exit(e int) { } else { // build error string var tmp [32]byte - status = []byte(gostringnocopy(&itoa(tmp[:len(tmp)-1], uint64(e))[0])) + status = append(itoa(tmp[:len(tmp)-1], uint64(e)), 0) } goexitsall(&status[0]) exits(&status[0])