WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
191888
[SOUP] Certificate decoder always returns GByteArray with zero size
https://bugs.webkit.org/show_bug.cgi?id=191888
Summary
[SOUP] Certificate decoder always returns GByteArray with zero size
Adrian Perez
Reported
2018-11-21 07:56:07 PST
[SOUP] Certificate decoder always returns GByteArray with zero size
Attachments
Patch
(1.55 KB, patch)
2018-11-21 07:59 PST
,
Adrian Perez
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Adrian Perez
Comment 1
2018-11-21 07:59:24 PST
Created
attachment 355413
[details]
Patch
Zan Dobersek
Comment 2
2018-11-21 08:11:23 PST
Comment on
attachment 355413
[details]
Patch Can you check other similar cases (i.e. g_byte_array_sized_new() calls without the subsequent g_byte_array_set_size() call), if any?
Claudio Saavedra
Comment 3
2018-11-21 08:13:17 PST
(In reply to Zan Dobersek from
comment #2
)
> Comment on
attachment 355413
[details]
> Patch > > Can you check other similar cases (i.e. g_byte_array_sized_new() calls > without the subsequent g_byte_array_set_size() call), if any?
This is only needed here because we're writing directly to the array->bytes instead of calling g_byte_array_append(), which saves us one allocation, but has this drawback.
Adrian Perez
Comment 4
2018-11-21 08:13:34 PST
(In reply to Zan Dobersek from
comment #2
)
> Comment on
attachment 355413
[details]
> Patch > > Can you check other similar cases (i.e. g_byte_array_sized_new() calls > without the subsequent g_byte_array_set_size() call), if any?
Sure, I'll take a look and if needed (hopefully not!) then add new bug reports for them :)
Adrian Perez
Comment 5
2018-11-21 08:17:36 PST
(In reply to Adrian Perez from
comment #4
)
> (In reply to Zan Dobersek from
comment #2
) > > Comment on
attachment 355413
[details]
> > Patch > > > > Can you check other similar cases (i.e. g_byte_array_sized_new() calls > > without the subsequent g_byte_array_set_size() call), if any? > > Sure, I'll take a look and if needed (hopefully not!) then add new > bug reports for them :)
The only other use of “g_byte_array_sized_new()” is in “WebKit/Shared/soup/WebCoreArgumentCodersSoup.cpp” (line 103), and in that case is followed by a call to “g_byte_array_append()” instead 👍
WebKit Commit Bot
Comment 6
2018-11-21 08:37:36 PST
Comment on
attachment 355413
[details]
Patch Clearing flags on attachment: 355413 Committed
r238417
: <
https://trac.webkit.org/changeset/238417
>
WebKit Commit Bot
Comment 7
2018-11-21 08:37:38 PST
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 8
2018-11-21 08:38:25 PST
<
rdar://problem/46201982
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug