[Webkit-unassigned] [Bug 191498] [Curl] implement CertificateInfo::summaryInfo

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jul 10 18:55:16 PDT 2019


https://bugs.webkit.org/show_bug.cgi?id=191498

--- Comment #11 from Takashi Komori <Takashi.Komori at sony.com> ---
(In reply to Fujii Hironori from comment #2)
> Comment on attachment 373699 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=373699&action=review
> 
> > Source/WebCore/platform/network/curl/CertificateInfoCurl.cpp:28
> > +#include "OpenSSLHelper.h"
> 
> See https://webkit.org/code-style-guidelines/#include-config-h
> 
> > Source/WebCore/platform/network/curl/CertificateInfoCurl.cpp:168
> > +                char buf[256] { 0 };
> 
> Remove '{ 0 }'. clang-cl reports a warning.
> char buf[16];
> 
> > Source/WebCore/platform/network/curl/CertificateInfoCurl.cpp:169
> > +                snprintf(buf, sizeof(buf), "%d.%d.%d.%d", data[0], data[1], data[2], data[3]);
> 
> I think WTF::makeString is better than snprintf. See also Bug 199452.
> 
> > Source/WebCore/platform/network/curl/CertificateInfoCurl.cpp:174
> > +                for (int i = 0; i < 8; i++) {
> 
> Move 'buf' here.
> char buf[5];

Stop using char buffer and snprintf.


> > Source/WebCore/platform/network/curl/OpenSSLHelper.h:181
> > +class Ptr {
> 
> Can you use std::unique_ptr? You can specify a custom deleter. 
> https://en.cppreference.com/w/cpp/memory/unique_ptr
> 

Fixed.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20190711/bc59d5a8/attachment-0001.html>


More information about the webkit-unassigned mailing list