[SOUP] Certificate decoder always returns GByteArray with zero size
Created attachment 355413 [details] Patch
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?
(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.
(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 :)
(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 👍
Comment on attachment 355413 [details] Patch Clearing flags on attachment: 355413 Committed r238417: <https://trac.webkit.org/changeset/238417>
All reviewed patches have been landed. Closing bug.
<rdar://problem/46201982>