⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 246092 in webkit


Ignore:
Timestamp:
Jun 4, 2019, 5:40:35 PM (7 years ago)
Author:
Keith Rollin
Message:

Fix 64-bit vs 32-bit mismatch in ISOFairPlayStreamingPsshBox.cpp
https://bugs.webkit.org/show_bug.cgi?id=198539
<rdar://problem/51410358>

Reviewed by Alex Christensen.

Both ISOFairPlayStreamingKeyAssetIdBox and
ISOFairPlayStreamingKeyContextBox have Vector<> data members. The
parse() members of these classes call Vector<>::resize() on these
members. In both cases, the type of the parameter passed is a
uint64_t. However, resize() takes a size_t. On some platforms, size_t
is a 32-bit value, leading to a compile-time type mismatch error. Fix
this by changing the type of the value passed to parse() into a
size_t.

No new tests -- no new functionality.

  • platform/graphics/avfoundation/ISOFairPlayStreamingPsshBox.cpp:

(WebCore::ISOFairPlayStreamingKeyAssetIdBox::parse):
(WebCore::ISOFairPlayStreamingKeyContextBox::parse):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r246091 r246092  
     12019-06-04  Keith Rollin  <krollin@apple.com>
     2
     3        Fix 64-bit vs 32-bit mismatch in ISOFairPlayStreamingPsshBox.cpp
     4        https://bugs.webkit.org/show_bug.cgi?id=198539
     5        <rdar://problem/51410358>
     6
     7        Reviewed by Alex Christensen.
     8
     9        Both ISOFairPlayStreamingKeyAssetIdBox and
     10        ISOFairPlayStreamingKeyContextBox have Vector<> data members. The
     11        parse() members of these classes call Vector<>::resize() on these
     12        members. In both cases, the type of the parameter passed is a
     13        uint64_t. However, resize() takes a size_t. On some platforms, size_t
     14        is a 32-bit value, leading to a compile-time type mismatch error. Fix
     15        this by changing the type of the value passed to parse() into a
     16        size_t.
     17
     18        No new tests -- no new functionality.
     19
     20        * platform/graphics/avfoundation/ISOFairPlayStreamingPsshBox.cpp:
     21        (WebCore::ISOFairPlayStreamingKeyAssetIdBox::parse):
     22        (WebCore::ISOFairPlayStreamingKeyContextBox::parse):
     23
    1242019-06-04  Keith Rollin  <krollin@apple.com>
    225
  • trunk/Source/WebCore/platform/graphics/avfoundation/ISOFairPlayStreamingPsshBox.cpp

    r244439 r246092  
    8989        return false;
    9090
    91     uint64_t dataSize;
     91    size_t dataSize;
    9292    if (!WTF::safeSub(m_size, localOffset - offset, dataSize))
    9393        return false;
     
    118118        return false;
    119119
    120     uint64_t dataSize;
     120    size_t dataSize;
    121121    if (!WTF::safeSub(m_size, localOffset - offset, dataSize))
    122122        return false;
Note: See TracChangeset for help on using the changeset viewer.