<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>191888</bug_id>
          
          <creation_ts>2018-11-21 07:56:07 -0800</creation_ts>
          <short_desc>[SOUP] Certificate decoder always returns GByteArray with zero size</short_desc>
          <delta_ts>2018-11-21 08:38:25 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>New Bugs</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Adrian Perez">aperez</reporter>
          <assigned_to name="Adrian Perez">aperez</assigned_to>
          <cc>berto</cc>
    
    <cc>cgarcia</cc>
    
    <cc>commit-queue</cc>
    
    <cc>csaavedra</cc>
    
    <cc>ews-watchlist</cc>
    
    <cc>gustavo</cc>
    
    <cc>hi</cc>
    
    <cc>joepeck</cc>
    
    <cc>mcatanzaro</cc>
    
    <cc>sam</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>zan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1480756</commentid>
    <comment_count>0</comment_count>
    <who name="Adrian Perez">aperez</who>
    <bug_when>2018-11-21 07:56:07 -0800</bug_when>
    <thetext>[SOUP] Certificate decoder always returns GByteArray with zero size</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1480757</commentid>
    <comment_count>1</comment_count>
      <attachid>355413</attachid>
    <who name="Adrian Perez">aperez</who>
    <bug_when>2018-11-21 07:59:24 -0800</bug_when>
    <thetext>Created attachment 355413
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1480759</commentid>
    <comment_count>2</comment_count>
      <attachid>355413</attachid>
    <who name="Zan Dobersek">zan</who>
    <bug_when>2018-11-21 08:11:23 -0800</bug_when>
    <thetext>Comment on attachment 355413
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?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1480760</commentid>
    <comment_count>3</comment_count>
    <who name="Claudio Saavedra">csaavedra</who>
    <bug_when>2018-11-21 08:13:17 -0800</bug_when>
    <thetext>(In reply to Zan Dobersek from comment #2)
&gt; Comment on attachment 355413 [details]
&gt; Patch
&gt; 
&gt; Can you check other similar cases (i.e. g_byte_array_sized_new() calls
&gt; without the subsequent g_byte_array_set_size() call), if any?

This is only needed here because we&apos;re writing directly to the array-&gt;bytes instead of calling g_byte_array_append(), which saves us one allocation, but has this drawback.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1480761</commentid>
    <comment_count>4</comment_count>
    <who name="Adrian Perez">aperez</who>
    <bug_when>2018-11-21 08:13:34 -0800</bug_when>
    <thetext>(In reply to Zan Dobersek from comment #2)
&gt; Comment on attachment 355413 [details]
&gt; Patch
&gt; 
&gt; Can you check other similar cases (i.e. g_byte_array_sized_new() calls
&gt; without the subsequent g_byte_array_set_size() call), if any?

Sure, I&apos;ll take a look and if needed (hopefully not!) then add new
bug reports for them :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1480762</commentid>
    <comment_count>5</comment_count>
    <who name="Adrian Perez">aperez</who>
    <bug_when>2018-11-21 08:17:36 -0800</bug_when>
    <thetext>(In reply to Adrian Perez from comment #4)
&gt; (In reply to Zan Dobersek from comment #2)
&gt; &gt; Comment on attachment 355413 [details]
&gt; &gt; Patch
&gt; &gt; 
&gt; &gt; Can you check other similar cases (i.e. g_byte_array_sized_new() calls
&gt; &gt; without the subsequent g_byte_array_set_size() call), if any?
&gt; 
&gt; Sure, I&apos;ll take a look and if needed (hopefully not!) then add new
&gt; 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 👍</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1480764</commentid>
    <comment_count>6</comment_count>
      <attachid>355413</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2018-11-21 08:37:36 -0800</bug_when>
    <thetext>Comment on attachment 355413
Patch

Clearing flags on attachment: 355413

Committed r238417: &lt;https://trac.webkit.org/changeset/238417&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1480765</commentid>
    <comment_count>7</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2018-11-21 08:37:38 -0800</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1480766</commentid>
    <comment_count>8</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2018-11-21 08:38:25 -0800</bug_when>
    <thetext>&lt;rdar://problem/46201982&gt;</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>355413</attachid>
            <date>2018-11-21 07:59:24 -0800</date>
            <delta_ts>2018-11-21 08:37:36 -0800</delta_ts>
            <desc>Patch</desc>
            <filename>bug-191888-20181121195841.patch</filename>
            <type>text/plain</type>
            <size>1586</size>
            <attacher name="Adrian Perez">aperez</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMjM4NDE1CmRpZmYgLS1naXQgYS9Tb3VyY2UvV2ViQ29yZS9D
aGFuZ2VMb2cgYi9Tb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