Changeset 70635 in webkit


Ignore:
Timestamp:
Oct 27, 2010 4:48:24 AM (14 years ago)
Author:
commit-queue@webkit.org
Message:

2010-10-27 Kimmo Kinnunen <kimmo.t.kinnunen@nokia.com>

Reviewed by Andreas Kling.

[Qt] Type mismatch while serializing/deserializing message id size
https://bugs.webkit.org/show_bug.cgi?id=48401

Use correct types when reading data from connection buffer.

The message id is written as uint32_t, thus the buffer size should be
calculated based on sizeof(uint32_t) and not sizeof(MessageID).

  • Platform/CoreIPC/qt/ConnectionQt.cpp: (CoreIPC::Connection::readyReadHandler):
Location:
trunk/WebKit2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKit2/ChangeLog

    r70620 r70635  
     12010-10-27  Kimmo Kinnunen  <kimmo.t.kinnunen@nokia.com>
     2
     3        Reviewed by Andreas Kling.
     4
     5        [Qt] Type mismatch while serializing/deserializing message id size
     6        https://bugs.webkit.org/show_bug.cgi?id=48401
     7
     8        Use correct types when reading data from connection buffer.
     9
     10        The message id is written as uint32_t, thus the buffer size should be
     11        calculated based on sizeof(uint32_t) and not sizeof(MessageID).
     12
     13        * Platform/CoreIPC/qt/ConnectionQt.cpp:
     14        (CoreIPC::Connection::readyReadHandler):
     15
    1162010-10-27  Zalan Bujtas  <zbujtas@gmail.com>
    217
  • trunk/WebKit2/Platform/CoreIPC/qt/ConnectionQt.cpp

    r69329 r70635  
    7373
    7474        // The messageID is encoded at the end of the buffer.
    75         size_t realBufferSize = m_currentMessageSize - sizeof(MessageID);
    76         unsigned messageID = *reinterpret_cast<unsigned*>(m_readBuffer.data() + realBufferSize);
     75        size_t realBufferSize = m_currentMessageSize - sizeof(uint32_t);
     76        uint32_t messageID = *reinterpret_cast<uint32_t*>(m_readBuffer.data() + realBufferSize);
    7777
    7878        processIncomingMessage(MessageID::fromInt(messageID), adoptPtr(new ArgumentDecoder(m_readBuffer.data(), realBufferSize)));
Note: See TracChangeset for help on using the changeset viewer.