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

See Also:

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]
Comment 2 Adrian Perez 2021-02-05 05:21:45 PST
Comment on attachment 419390 [details]

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>