runtime: fix buffer overflow in stringtoslicerune
On 32-bits n*sizeof(r[0]) can overflow. Or it can become 1<<32-eps, and mallocgc will "successfully" allocate 0 pages for it, there are no checks downstream and MHeap_Grow just does: npage = (npage+15)&~15; ask = npage<<PageShift; LGTM=khr R=golang-codereviews, khr CC=golang-codereviews https://golang.org/cl/54760045
Showing
Please register or sign in to comment