WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
160850
[Win] Hardening of getLinkedFonts function.
https://bugs.webkit.org/show_bug.cgi?id=160850
Summary
[Win] Hardening of getLinkedFonts function.
Per Arne Vollan
Reported
2016-08-15 07:35:42 PDT
The SUCCEEDED macro should only be used for functions returning a HRESULT type. Also, make sure a string array index will not exceed the string length.
Attachments
Patch
(1.92 KB, patch)
2016-08-15 08:03 PDT
,
Per Arne Vollan
bfulgham
: review+
commit-queue
: commit-queue-
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Per Arne Vollan
Comment 1
2016-08-15 08:03:05 PDT
Created
attachment 286053
[details]
Patch
Brent Fulgham
Comment 2
2016-08-15 08:43:02 PDT
Comment on
attachment 286053
[details]
Patch Interesting! I didn't know that SUCCEEDED was inappropriate here. Are there return values from RegQueryValueEx that might fool SUCCEEDED? It also makes me wonder if we should be using the FAILED macro a few lines above this one, since it also returns a LONG instead of an HRESULT. I also wonder if we should call "family.charactersWithNullTermination().data()" so many times -- I think (but didn't look) that it creates a new string each time we call that. r=me! :-)
Per Arne Vollan
Comment 3
2016-08-15 09:39:20 PDT
(In reply to
comment #2
)
> Comment on
attachment 286053
[details]
> Patch
Thanks for reviewing :-)
> > Interesting! I didn't know that SUCCEEDED was inappropriate here. Are there > return values from RegQueryValueEx that might fool SUCCEEDED? >
Yes I believe there are.
> It also makes me wonder if we should be using the FAILED macro a few lines > above this one, since it also returns a LONG instead of an HRESULT. > > I also wonder if we should call > "family.charactersWithNullTermination().data()" so many times -- I think > (but didn't look) that it creates a new string each time we call that. >
Yes I believe you're right. I can look into that :-)
Per Arne Vollan
Comment 4
2016-08-15 09:41:22 PDT
rdar://problem/17471209
WebKit Commit Bot
Comment 5
2016-08-15 09:45:52 PDT
Comment on
attachment 286053
[details]
Patch Rejecting
attachment 286053
[details]
from commit-queue. Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.webkit.org', '--bot-id=webkit-cq-01', 'validate-changelog', '--check-oops', '--non-interactive', 286053, '--port=mac']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit /Volumes/Data/EWS/WebKit/Source/WebCore/ChangeLog neither lists a valid reviewer nor contains the string "Unreviewed" or "Rubber stamp" (case insensitive). Full output:
http://webkit-queues.webkit.org/results/1875986
Myles C. Maxfield
Comment 6
2016-08-15 13:58:18 PDT
Please write a test for the comma change.
Per Arne Vollan
Comment 7
2016-08-16 02:48:56 PDT
Committed
r204502
: <
https://trac.webkit.org/changeset/204502
>
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