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

Issue 178120043: code review 178120043: image/jpeg: handle Read returning n > 0, err != nil in ... (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
9 years, 5 months ago by rsc
Modified:
9 years, 5 months ago
Reviewers:
r
CC:
bradfitz, r, golang-codereviews, nigeltao
Visibility:
Public.

Description

image/jpeg: handle Read returning n > 0, err != nil in d.fill Fixes issue 9127.

Patch Set 1 #

Patch Set 2 : diff -r d7d71f7d6f53e217837d46aedba49db8c8811705 https://code.google.com/p/go/ #

Patch Set 3 : diff -r d7d71f7d6f53e217837d46aedba49db8c8811705 https://code.google.com/p/go/ #

Total comments: 1

Patch Set 4 : diff -r 61bbf19823d5a09b920bf926ea6853e5a97a6bb4 https://code.google.com/p/go/ #

Patch Set 5 : diff -r 61bbf19823d5a09b920bf926ea6853e5a97a6bb4 https://code.google.com/p/go/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+49 lines, -0 lines) Patch
M src/image/jpeg/reader.go View 1 1 chunk +3 lines, -0 lines 0 comments Download
M src/image/jpeg/reader_test.go View 1 2 3 2 chunks +46 lines, -0 lines 0 comments Download

Messages

Total messages: 16
rsc
Hello bradfitz, r (cc: golang-codereviews@googlegroups.com, nigeltao), I'd like you to review this change to https://code.google.com/p/go/
9 years, 5 months ago (2014-11-21 20:17:26 UTC) #1
bradfitz
I assume the error was io.EOF. Should we record non-nil && non-EOF errors in the ...
9 years, 5 months ago (2014-11-21 21:00:31 UTC) #2
r
Brad, what error is it getting? -rob
9 years, 5 months ago (2014-11-21 21:05:49 UTC) #3
rsc
All Read errors should be sticky. I would hope that would go without saying. If ...
9 years, 5 months ago (2014-11-21 21:06:07 UTC) #4
bradfitz
On Fri, Nov 21, 2014 at 1:06 PM, Russ Cox <rsc@golang.org> wrote: > All Read ...
9 years, 5 months ago (2014-11-21 21:10:28 UTC) #5
r
I'm fine with the fix but I'd still like to know what error Brad is ...
9 years, 5 months ago (2014-11-21 21:14:00 UTC) #6
r
LGTM although a test would be good https://codereview.appspot.com/178120043/diff/40001/src/image/jpeg/reader.go File src/image/jpeg/reader.go (right): https://codereview.appspot.com/178120043/diff/40001/src/image/jpeg/reader.go#newcode147 src/image/jpeg/reader.go:147: err = ...
9 years, 5 months ago (2014-11-21 21:15:15 UTC) #7
bradfitz
The error I saw was pasted into https://golang.org/issue/9127 : mac:~ bradfitz$ go run d.go 2014/11/18 ...
9 years, 5 months ago (2014-11-21 21:19:58 UTC) #8
bradfitz
er, p[:n] On Fri, Nov 21, 2014 at 1:19 PM, Brad Fitzpatrick <bradfitz@golang.org> wrote: > ...
9 years, 5 months ago (2014-11-21 21:20:28 UTC) #9
r
I was wondering what error the Read got. I am asking to verify your assumption. ...
9 years, 5 months ago (2014-11-21 21:26:32 UTC) #10
rsc
net.Read can and does return realdata, EOF often. I am 99% sure that was the ...
9 years, 5 months ago (2014-11-21 21:33:19 UTC) #11
bradfitz
Verified. It is io.EOF. // Fill in the rest of the buffer. n, err := ...
9 years, 5 months ago (2014-11-21 21:34:58 UTC) #12
r
Thanks.
9 years, 5 months ago (2014-11-21 21:40:49 UTC) #13
nigeltao
On 22 Nov 2014 08:10, "Brad Fitzpatrick" <bradfitz@golang.org> wrote: > FWIW I think it's worth ...
9 years, 5 months ago (2014-11-21 23:03:08 UTC) #14
rsc
There's now a test. Will submit shortly.
9 years, 5 months ago (2014-11-22 18:49:14 UTC) #15
rsc
9 years, 5 months ago (2014-11-22 18:55:44 UTC) #16
*** Submitted as https://code.google.com/p/go/source/detail?r=95f5614b4648 ***

image/jpeg: handle Read returning n > 0, err != nil in d.fill

Fixes issue 9127.

LGTM=r
R=bradfitz, r
CC=golang-codereviews, nigeltao
https://codereview.appspot.com/178120043
Sign in to reply to this message.

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