Bug 46929 - [WINCE] Fix InternetGetCookie in CookieJarWin.cpp
Summary: [WINCE] Fix InternetGetCookie in CookieJarWin.cpp
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other Other
: P2 Normal
Assignee: Patrick R. Gansterer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-30 12:42 PDT by Patrick R. Gansterer
Modified: 2010-09-30 15:20 PDT (History)
2 users (show)

See Also:


Attachments
Patch (1.22 KB, patch)
2010-09-30 12:46 PDT, Patrick R. Gansterer
no flags Details | Formatted Diff | Diff
Patch (1.71 KB, patch)
2010-09-30 12:59 PDT, Patrick R. Gansterer
commit-queue: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick R. Gansterer 2010-09-30 12:42:35 PDT
see patch
Comment 1 Patrick R. Gansterer 2010-09-30 12:46:59 PDT
Created attachment 69365 [details]
Patch
Comment 2 Adam Roben (:aroben) 2010-09-30 12:50:53 PDT
Comment on attachment 69365 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=69365&action=review

> WebCore/platform/network/win/CookieJarWin.cpp:54
> -    DWORD count = str.length() + 1;
> +    DWORD count = 0;
>      InternetGetCookie(str.charactersWithNullTermination(), 0, 0, &count);
>      if (count <= 1) // Null terminator counts as 1.
>          return String();

Why not check the return value of InternetGetCookie, too?
Comment 3 Patrick R. Gansterer 2010-09-30 12:52:21 PDT
(In reply to comment #2)
> Why not check the return value of InternetGetCookie, too?
IMHO it's not required, but I can add it.
Comment 4 Adam Roben (:aroben) 2010-09-30 12:53:32 PDT
(In reply to comment #3)
> (In reply to comment #2)
> > Why not check the return value of InternetGetCookie, too?
> IMHO it's not required, but I can add it.

It seems like a good idea, rather than relying on how the out parameter is treated in failure cases (which MSDN doesn't document).
Comment 5 Patrick R. Gansterer 2010-09-30 12:59:55 PDT
Created attachment 69368 [details]
Patch
Comment 6 WebKit Commit Bot 2010-09-30 15:19:27 PDT
Comment on attachment 69368 [details]
Patch

Clearing flags on attachment: 69368

Committed r68841: <http://trac.webkit.org/changeset/68841>
Comment 7 WebKit Commit Bot 2010-09-30 15:19:32 PDT
All reviewed patches have been landed.  Closing bug.
Comment 8 WebKit Commit Bot 2010-09-30 15:20:25 PDT
Comment on attachment 69368 [details]
Patch

Rejecting patch 69368 from commit-queue.

Failed to run "['./WebKitTools/Scripts/webkit-patch', '--status-host=queues.webkit.org', 'land-attachment', '--force-clean', '--ignore-builders', '--quiet', '--non-interactive', '--parent-command=commit-queue', 69368]" exit_code: 2
Last 500 characters of output:
ipts/svn-apply', u'--reviewer', u'Adam Roben', u'--force']" exit_code: 1
Parsed 2 diffs from patch file(s).
patching file WebCore/ChangeLog
Hunk #1 succeeded at 1 with fuzz 3.
patching file WebCore/platform/network/win/CookieJarWin.cpp
Hunk #1 FAILED at 48.
1 out of 1 hunk FAILED -- saving rejects to file WebCore/platform/network/win/CookieJarWin.cpp.rej

Failed to run "[u'/Users/eseidel/Projects/CommitQueue/WebKitTools/Scripts/svn-apply', u'--reviewer', u'Adam Roben', u'--force']" exit_code: 1

Full output: http://queues.webkit.org/results/4222021