Changeset 220677 in webkit


Ignore:
Timestamp:
Aug 14, 2017 4:12:23 AM (7 years ago)
Author:
Carlos Garcia Campos
Message:

[GTK][WPE] Crash in IconDatabase::IconRecord::setImageData()
https://bugs.webkit.org/show_bug.cgi?id=175527

Reviewed by Žan Doberšek.

The problem is that when setImageData() is called from IconDatabase::readFromDatabase() the shared buffer might
be nullptr, because getImageDataForIconURLFromSQLDatabase() returns nullptr if the icon data is not in the database.

  • UIProcess/API/glib/IconDatabase.cpp:

(WebKit::IconDatabase::IconRecord::setImageData): Return early if passed in buffer is nullptr.

Location:
trunk/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r220672 r220677  
     12017-08-14  Carlos Garcia Campos  <cgarcia@igalia.com>
     2
     3        [GTK][WPE] Crash in IconDatabase::IconRecord::setImageData()
     4        https://bugs.webkit.org/show_bug.cgi?id=175527
     5
     6        Reviewed by Žan Doberšek.
     7
     8        The problem is that when setImageData() is called from IconDatabase::readFromDatabase() the shared buffer might
     9        be nullptr, because getImageDataForIconURLFromSQLDatabase() returns nullptr if the icon data is not in the database.
     10
     11        * UIProcess/API/glib/IconDatabase.cpp:
     12        (WebKit::IconDatabase::IconRecord::setImageData): Return early if passed in buffer is nullptr.
     13
    1142017-08-14  Zan Dobersek  <zdobersek@igalia.com>
    215
  • trunk/Source/WebKit/UIProcess/API/glib/IconDatabase.cpp

    r220580 r220677  
    121121    m_image = nullptr;
    122122
    123     if (!m_imageData->size()) {
     123    if (!m_imageData || !m_imageData->size()) {
    124124        m_imageData = nullptr;
    125125        return;
Note: See TracChangeset for help on using the changeset viewer.