WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
140938
Refactor the code to handle missing va_end() call after va_start() in String::format
https://bugs.webkit.org/show_bug.cgi?id=140938
Summary
Refactor the code to handle missing va_end() call after va_start() in String:...
Santosh Mahto
Reported
2015-01-27 07:00:34 PST
In WTFString.cpp WTF::String::format(), va_end call could be missed after va_start() is called if the function return at following places. if (result == 0) return String(""); if (result < 0) return String();
Attachments
Patch
(1.75 KB, patch)
2015-01-27 07:29 PST
,
Santosh Mahto
no flags
Details
Formatted Diff
Diff
Patch
(1.94 KB, patch)
2015-01-28 07:07 PST
,
Santosh Mahto
no flags
Details
Formatted Diff
Diff
Patch for landing
(2.14 KB, patch)
2015-01-29 10:52 PST
,
Santosh Mahto
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Santosh Mahto
Comment 1
2015-01-27 07:29:00 PST
Created
attachment 245445
[details]
Patch
Alexey Proskuryakov
Comment 2
2015-01-27 17:03:35 PST
Comment on
attachment 245445
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=245445&action=review
> Source/WTF/wtf/text/WTFString.cpp:469 > // Not calling va_end/va_start here happens to work on lots of > // systems, but fails e.g. on 64bit Linux.
The patch looks good to me, but it needs to remove the orphaned comment.
Santosh Mahto
Comment 3
2015-01-28 07:07:56 PST
Created
attachment 245539
[details]
Patch
Santosh Mahto
Comment 4
2015-01-28 07:09:30 PST
(In reply to
comment #2
)
> Comment on
attachment 245445
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=245445&action=review
> > > Source/WTF/wtf/text/WTFString.cpp:469 > > // Not calling va_end/va_start here happens to work on lots of > > // systems, but fails e.g. on 64bit Linux. > > The patch looks good to me, but it needs to remove the orphaned comment.
Thanks for review. please review the next update incorporating your suggestion.
Alexey Proskuryakov
Comment 5
2015-01-28 09:43:04 PST
Comment on
attachment 245539
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=245539&action=review
> Source/WTF/ChangeLog:8 > + Moved va_start/va_end call to match seperately.
The correct spelling is "separately". Also, not sure if this comment adds anything of value on top of the title. Is there any known benefit, other than the code looking slightly more nicely (e.g. does that fix some platform)? It would be good to explain that in the bug for posterity if so.
Santosh Mahto
Comment 6
2015-01-29 10:52:35 PST
Created
attachment 245631
[details]
Patch for landing
Santosh Mahto
Comment 7
2015-01-29 11:11:36 PST
(In reply to
comment #5
)
> Comment on
attachment 245539
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=245539&action=review
> > > Source/WTF/ChangeLog:8 > > + Moved va_start/va_end call to match seperately. > > The correct spelling is "separately". Also, not sure if this comment adds > anything of value on top of the title. > > Is there any known benefit, other than the code looking slightly more nicely > (e.g. does that fix some platform)? It would be good to explain that in the > bug for posterity if s
I updated the comment section.may be it make sense now a bit. sending it to land
WebKit Commit Bot
Comment 8
2015-01-29 11:49:20 PST
Comment on
attachment 245631
[details]
Patch for landing Clearing flags on attachment: 245631 Committed
r179354
: <
http://trac.webkit.org/changeset/179354
>
WebKit Commit Bot
Comment 9
2015-01-29 11:49:26 PST
All reviewed patches have been landed. Closing bug.
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