Skip to content

image/jpeg: index out of range in progress JPEG processSOS #4975

Description

@bradfitz
From App Engine mailing list:

package main

import (
    "net/http"
    "image/jpeg"
)

func main() {
    r, _ := http.Get("http://blog-assets.pinterest.com/img/post/2013012801.jpg";)
    jpeg.Decode(r.Body)
}


$ go run progress.go 
panic: runtime error: index out of range

goroutine 1 [running]:
image/jpeg.(*decoder).processSOS(0xc2000e8000, 0x6, 0xc2000f1d28, 0x2)
    /home/bradfitz/go/src/pkg/image/jpeg/scan.go:180 +0x19a3
image/jpeg.(*decoder).decode(0xc2000e8000, 0xc2000e7030, 0xc2000b7340, 0x408b00,
0x5b4750, ...)
    /home/bradfitz/go/src/pkg/image/jpeg/reader.go:296 +0x6f2
image/jpeg.Decode(0xc2000e7030, 0xc2000b7340, 0xc2000b7340, 0xc2000e7030, 0xc2000b7340,
...)
    /home/bradfitz/go/src/pkg/image/jpeg/reader.go:320 +0x4b
main.main()
    /home/bradfitz/progress.go:10 +0x76

goroutine 2 [syscall]:

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions