Bug 221459 - [SOUP] Fix error handling in WebKitFormDataInputStream
Summary: [SOUP] Fix error handling in WebKitFormDataInputStream
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: Gtk
Depends on:
Blocks:
 
Reported: 2021-02-05 05:02 PST by Carlos Garcia Campos
Modified: 2021-02-05 06:52 PST (History)
2 users (show)

See Also:


Attachments
Patch (1.49 KB, patch)
2021-02-05 05:03 PST, Carlos Garcia Campos
aperez: review+
ews-feeder: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Garcia Campos 2021-02-05 05:02:00 PST
We are checking the error parameter passed, that can be nullptr when not provided, we should be checking the return value of g_input_stream_read() instead.
Comment 1 Carlos Garcia Campos 2021-02-05 05:03:09 PST
Created attachment 419390 [details]
Patch
Comment 2 Adrian Perez 2021-02-05 05:21:45 PST
Comment on attachment 419390 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=419390&action=review

> Source/WebCore/platform/network/soup/WebKitFormDataInputStream.cpp:92
> +        if (bytesRead == -1)

Good catch ^_^
Comment 3 Carlos Garcia Campos 2021-02-05 05:24:03 PST
Committed r272410: <https://trac.webkit.org/changeset/272410>