Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1396)

Issue 7602045: code review 7602045: image/gif: reject a GIF image if frame bounds larger th... (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 1 month ago by jeff.allen
Modified:
11 years, 1 month ago
Reviewers:
dave, albert.strasheim
CC:
nigeltao, jra, r, bradfitz, golang-dev
Visibility:
Public.

Description

image/gif: reject a GIF image if frame bounds larger than image bounds The GIF89a spec says: "Each image must fit within the boundaries of the Logical Screen, as defined in the Logical Screen Descriptor." Also, do not accept GIFs which have too much data for the image size.

Patch Set 1 #

Patch Set 2 : diff -r 5957d9d08900 http://code.google.com/p/go #

Patch Set 3 : diff -r 5957d9d08900 http://code.google.com/p/go #

Patch Set 4 : diff -r 5957d9d08900 http://code.google.com/p/go #

Total comments: 19

Patch Set 5 : diff -r 786e094255c9 http://code.google.com/p/go #

Patch Set 6 : diff -r 786e094255c9 http://code.google.com/p/go #

Total comments: 11

Patch Set 7 : diff -r 3246e13bf1ca http://code.google.com/p/go #

Patch Set 8 : diff -r 3246e13bf1ca http://code.google.com/p/go #

Total comments: 10

Patch Set 9 : diff -r ee1b8339ab04 http://code.google.com/p/go #

Total comments: 1

Patch Set 10 : diff -r 9ca85035f95a http://code.google.com/p/go #

Total comments: 2

Patch Set 11 : diff -r 9ca85035f95a http://code.google.com/p/go #

Patch Set 12 : diff -r 9ca85035f95a http://code.google.com/p/go #

Unified diffs Side-by-side diffs Delta from patch set Stats (+58 lines, -1 line) Patch
M src/pkg/image/gif/reader.go View 1 2 3 4 5 6 7 8 9 1 chunk +9 lines, -1 line 0 comments Download
M src/pkg/image/gif/reader_test.go View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +49 lines, -0 lines 0 comments Download

Messages

Total messages: 28
r
This adds, at least implicitly, dependency on another tool to maintain the test. Can you ...
11 years, 1 month ago (2013-03-15 17:15:23 UTC) #1
jeff.allen
Sure thing, will put the gif inside of reader_test.go, but not until Tuesday.
11 years, 1 month ago (2013-03-15 17:51:55 UTC) #2
bradfitz
I like this approach a lot more. https://codereview.appspot.com/7602045/diff/9001/src/pkg/image/gif/reader.go File src/pkg/image/gif/reader.go (right): https://codereview.appspot.com/7602045/diff/9001/src/pkg/image/gif/reader.go#newcode352 src/pkg/image/gif/reader.go:352: width = ...
11 years, 1 month ago (2013-03-15 19:20:47 UTC) #3
jeff.allen
https://codereview.appspot.com/7602045/diff/9001/src/pkg/image/gif/reader.go File src/pkg/image/gif/reader.go (right): https://codereview.appspot.com/7602045/diff/9001/src/pkg/image/gif/reader.go#newcode352 src/pkg/image/gif/reader.go:352: width = d.width Browsers take a liberal view of ...
11 years, 1 month ago (2013-03-15 21:27:02 UTC) #4
nigeltao
https://codereview.appspot.com/7602045/diff/9001/src/pkg/image/gif/reader.go File src/pkg/image/gif/reader.go (right): https://codereview.appspot.com/7602045/diff/9001/src/pkg/image/gif/reader.go#newcode185 src/pkg/image/gif/reader.go:185: if pix, err = ioutil.ReadAll(lzwr); err != nil { ...
11 years, 1 month ago (2013-03-18 01:49:49 UTC) #5
nigeltao
https://codereview.appspot.com/7602045/diff/9001/src/pkg/image/gif/reader_test.go File src/pkg/image/gif/reader_test.go (right): https://codereview.appspot.com/7602045/diff/9001/src/pkg/image/gif/reader_test.go#newcode8 src/pkg/image/gif/reader_test.go:8: func TestDecodeGifError(t *testing.T) { s/Gif/GIF/, but even better is ...
11 years, 1 month ago (2013-03-18 01:53:12 UTC) #6
jeff.allen
https://codereview.appspot.com/7602045/diff/9001/src/pkg/image/gif/reader.go File src/pkg/image/gif/reader.go (right): https://codereview.appspot.com/7602045/diff/9001/src/pkg/image/gif/reader.go#newcode185 src/pkg/image/gif/reader.go:185: if pix, err = ioutil.ReadAll(lzwr); err != nil { ...
11 years, 1 month ago (2013-03-19 09:37:10 UTC) #7
jeff.allen
Hello nigeltao@golang.org (cc: bradfitz@golang.org, golang-dev@googlegroups.com, r@golang.org), I'd like you to review this change to http://code.google.com/p/go
11 years, 1 month ago (2013-03-19 10:01:15 UTC) #8
nigeltao
https://codereview.appspot.com/7602045/diff/21001/src/pkg/image/gif/reader_test.go File src/pkg/image/gif/reader_test.go (right): https://codereview.appspot.com/7602045/diff/21001/src/pkg/image/gif/reader_test.go#newcode8 src/pkg/image/gif/reader_test.go:8: // a gif with two frames, where the second ...
11 years, 1 month ago (2013-03-20 02:57:45 UTC) #9
nigeltao
https://codereview.appspot.com/7602045/diff/9001/src/pkg/image/gif/reader.go File src/pkg/image/gif/reader.go (right): https://codereview.appspot.com/7602045/diff/9001/src/pkg/image/gif/reader.go#newcode352 src/pkg/image/gif/reader.go:352: width = d.width On 2013/03/19 09:37:10, jeff.allen wrote: > ...
11 years, 1 month ago (2013-03-20 03:55:05 UTC) #10
jra
I think this is now a philosophical question, but unlike most, the answer is clear. ...
11 years, 1 month ago (2013-03-20 07:15:51 UTC) #11
jeff.allen
https://codereview.appspot.com/7602045/diff/21001/src/pkg/image/gif/reader_test.go File src/pkg/image/gif/reader_test.go (right): https://codereview.appspot.com/7602045/diff/21001/src/pkg/image/gif/reader_test.go#newcode8 src/pkg/image/gif/reader_test.go:8: // a gif with two frames, where the second ...
11 years, 1 month ago (2013-03-20 10:23:06 UTC) #12
jeff.allen
Hello nigeltao@golang.org, jra@nella.org (cc: bradfitz@golang.org, golang-dev@googlegroups.com, r@golang.org), Please take another look.
11 years, 1 month ago (2013-03-20 10:23:13 UTC) #13
nigeltao
https://codereview.appspot.com/7602045/diff/21001/src/pkg/image/gif/reader_test.go File src/pkg/image/gif/reader_test.go (right): https://codereview.appspot.com/7602045/diff/21001/src/pkg/image/gif/reader_test.go#newcode27 src/pkg/image/gif/reader_test.go:27: 0x02, 0x04, 0x8c, 0x8f, 0x19, 0x05, 0x00, // lzw ...
11 years, 1 month ago (2013-03-21 00:31:03 UTC) #14
nigeltao
I've separated checking for too much / too little image data (compared to the declared ...
11 years, 1 month ago (2013-03-21 05:08:06 UTC) #15
jeff.allen
Hello nigeltao@golang.org, jra@nella.org (cc: bradfitz@golang.org, golang-dev@googlegroups.com, r@golang.org), Please take another look.
11 years, 1 month ago (2013-03-21 08:21:11 UTC) #16
r
https://codereview.appspot.com/7602045/diff/38001/src/pkg/image/gif/reader.go File src/pkg/image/gif/reader.go (right): https://codereview.appspot.com/7602045/diff/38001/src/pkg/image/gif/reader.go#newcode343 src/pkg/image/gif/reader.go:343: return nil, errors.New("gif: frame bounds is larger than image ...
11 years, 1 month ago (2013-03-21 16:28:17 UTC) #17
nigeltao
Please update the CL description to image/gif: reject a GIF image if frame bounds larger ...
11 years, 1 month ago (2013-03-22 03:44:45 UTC) #18
jeff.allen
Hello nigeltao@golang.org, jra@nella.org, r@golang.org (cc: bradfitz@golang.org, golang-dev@googlegroups.com), Please take another look.
11 years, 1 month ago (2013-03-22 15:04:01 UTC) #19
r
https://codereview.appspot.com/7602045/diff/45001/src/pkg/image/gif/reader_test.go File src/pkg/image/gif/reader_test.go (right): https://codereview.appspot.com/7602045/diff/45001/src/pkg/image/gif/reader_test.go#newcode88 src/pkg/image/gif/reader_test.go:88: // theGIF is a simple GIF that we can ...
11 years, 1 month ago (2013-03-22 15:28:20 UTC) #20
jeff.allen
Hello nigeltao@golang.org, jra@nella.org, r@golang.org (cc: bradfitz@golang.org, golang-dev@googlegroups.com), Please take another look.
11 years, 1 month ago (2013-03-22 15:31:18 UTC) #21
r
LGTM thanks
11 years, 1 month ago (2013-03-22 16:28:22 UTC) #22
r
*** Submitted as https://code.google.com/p/go/source/detail?r=7f837c455456 *** image/gif: reject a GIF image if frame bounds larger than ...
11 years, 1 month ago (2013-03-22 16:30:40 UTC) #23
albert.strasheim
On 2013/03/22 16:30:40, r wrote: > *** Submitted as https://code.google.com/p/go/source/detail?r=7f837c455456 *** > image/gif: reject a ...
11 years, 1 month ago (2013-03-25 07:25:44 UTC) #24
jra
What is this "multi threading" you're talking about and what's the big deal about it ...
11 years, 1 month ago (2013-03-25 07:32:38 UTC) #25
albert.strasheim
Hello On 2013/03/25 07:32:38, jra wrote: > What is this "multi threading" you're talking about ...
11 years, 1 month ago (2013-03-25 07:38:13 UTC) #26
dave_cheney.net
https://codereview.appspot.com/7808045 PTAL. On Mon, Mar 25, 2013 at 6:38 PM, <fullung@gmail.com> wrote: > Hello > ...
11 years, 1 month ago (2013-03-25 09:23:37 UTC) #27
dave_cheney.net
11 years, 1 month ago (2013-03-25 09:30:15 UTC) #28
Albert,

I would be grateful if you would lead off the discussion about testing
with multiple cpu values. I see this as a question of test repeatably,
ie, go test -cpu=1,1,1. I'm sure we have some gaps in the std library.

Cheers

Dave

On Mon, Mar 25, 2013 at 6:38 PM,  <fullung@gmail.com> wrote:
> Hello
>
>
> On 2013/03/25 07:32:38, jra wrote:
>>
>> What is this "multi threading" you're talking about and what's the big
>
> deal
>>
>> about it anyway? :)
>
>
> At some point in the past there was a discussion with Dmitry which lead
> to me the conclusion that I should include the following in my stress
> tests:
>
> go test -v -short -cpu 1,2,4 std
> go test -v -cpu 1,2,4 std
>
> These tend to turn up tests that weren't written to run more than once
> in the same process.
>
> I think there's value in this, but given that two separate packages
> tripped over this in the last few days, it seems like we need to do
> something to help people realise sooner when they break this test mode.
> That's probably a discussion for a separate thread.
>
> Cheers
>
> Albert
>
> https://codereview.appspot.com/7602045/
>
> --
>
> ---You received this message because you are subscribed to the Google Groups
> "golang-dev" group.
>
> To unsubscribe from this group and stop receiving emails from it, send an
> email to golang-dev+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b