Bug 13420 - Assert in addToTextEncodingNameMap() should use strcmp()
Summary: Assert in addToTextEncodingNameMap() should use strcmp()
Status: CLOSED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 523.x (Safari 3)
Hardware: PC Windows XP
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-04-20 15:22 PDT by Peter Kasting
Modified: 2007-04-20 16:08 PDT (History)
0 users

See Also:


Attachments
patch v1 (1.23 KB, patch)
2007-04-20 15:36 PDT, Peter Kasting
oliver: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Kasting 2007-04-20 15:22:04 PDT
TextEncodingRegistry.cpp:addToTextEncodingNameMap() has the following code:

ASSERT(alias == name || atomicName);

...where alias and name are both char*s.

We need to use strcmp() here, because the pointers are not guaranteed to be the same.  (Other similar statements elsewhere are safe, because they deal with the returned pointers out of the hash map.)

Patch coming shortly.
Comment 1 Peter Kasting 2007-04-20 15:36:04 PDT
Created attachment 14115 [details]
patch v1

Patch as discussed with olliej on IRC.
Comment 2 Oliver Hunt 2007-04-20 15:46:45 PDT
Landed in r20975