Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Src bounds checking fails and Transform results in index out of range panics #1

Open
GoogleCodeExporter opened this issue Jan 29, 2016 · 0 comments

Comments

@GoogleCodeExporter
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant