Bug 13420

Summary: Assert in addToTextEncodingNameMap() should use strcmp()
Product: WebKit Reporter: Peter Kasting <pkasting>
Component: WebCore Misc.Assignee: Nobody <webkit-unassigned>
Status: CLOSED FIXED    
Severity: Normal    
Priority: P2    
Version: 523.x (Safari 3)   
Hardware: PC   
OS: Windows XP   
Attachments:
Description Flags
patch v1 oliver: review+

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