Bug 56224

Summary: Wrong size passed into WTF::StringHasher::createBlobHash() in BinaryPropertyList.cpp line 95.
Product: WebKit Reporter: Yongjun Zhang <yongjun_zhang>
Component: WebCore Misc.Assignee: Nobody <webkit-unassigned>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: ap, beidson, darin
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: OS X 10.5   

Description Yongjun Zhang 2011-03-11 14:27:37 PST
See title, in Source/WebCore/platform/cf/BinaryPropertyList.cpp, line 95:
     
         WTF::StringHasher::createBlobHash(array.integers(), array.size());

which passes the size of integer array, i.e., how many integers the array has.  However,  StringHasher::createBlobHash(const void* data, unsigned size) (wtf/StringHasher.h:144) expects size to be the byte array's size.  For example, if the integer array has 1 integer, we would get an assertion failure in wtf/StringHasher.h:146:
        
         ASSERT(!(size % 2));
Comment 1 Darin Adler 2011-03-12 20:09:39 PST
Oops, I didn’t see this bug. Already fixed it.
Comment 2 Darin Adler 2011-03-12 20:09:53 PST

*** This bug has been marked as a duplicate of bug 56193 ***
Comment 3 Darin Adler 2011-03-12 20:11:00 PST

*** This bug has been marked as a duplicate of bug 56258 ***