Src bounds checking fails and Transform results in index out of range panics
Opened this issue · 0 comments
GoogleCodeExporter commented
What steps will reproduce the problem?
1. Compile the following program
package main
import "image"
import "graphics-go.googlecode.com/hg/graphics"
func main() {
src := image.NewGray(image.Rect(50,50,60,60))
dst := image.NewGray(image.Rect(0,0,100,100))
graphics.I.Transform(dst, src)
}
2. Run it.
What is the expected output? What do you see instead?
Absolutely nothing. Instead I get:
panic: runtime error: index out of range
goroutine 1 [running]:
graphics-go%2egooglecode%2ecom/hg/graphics.binterpRGBA(0xf84001c870,
0x3200000032, 0xf84001c570, 0x4049400000000000, 0x4049400000000000, ...)
/Users/gunca/Code/go/src/pkg/graphics-go.googlecode.com/hg/graphics/bilinear.go:104 +0x5e4
graphics-go%2egooglecode%2ecom/hg/graphics.Affine.Transform(0x3ff0000000000000,
0x0, 0x0, 0x0, 0x3ff0000000000000, ...)
/Users/gunca/Code/go/src/pkg/graphics-go.googlecode.com/hg/graphics/affine.go:66 +0x348
main.main()
/Users/gunca/Code/go-rotate/rotate.go:10 +0x144
What version of the product are you using? On what operating system?
hg identify -> d7322ae4d055+ weekly/weekly.2011-09-21
latest graphics-go on Snow Leopard
Original issue reported on code.google.com by Gunchars
on 12 Nov 2011 at 1:48