Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-44796

qcollator_icu segfaults if ucol_open fails

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P1: Critical
    • Resolution: Done
    • Affects Version/s: 5.4.1
    • Fix Version/s: 5.4.2
    • Component/s: Core: Locales (L10n)
    • Labels:
      None
    • Environment:
      Linux bp1-dsklin-3048-ngg 3.18.7-gentoo #3 SMP Wed Feb 25 19:54:44 CET 2015 x86_64 Intel(R) Core(TM) i5-4570 CPU @ 3.20GHz GenuineIntel GNU/Linux

      Qt is installed from the official package repository with ICU enabled.
    • Commits:
      8f061836993059996d79d7fbed2bb68b16028ad7

      Description

      In qcollator_icu.cpp, you try to open a collator with ucol_open(), and if it fails you give a warning, but you use it anyway. Later ucol_strcoll() crashes because a nullptr is given as the collator.

      On my Linux, ucol_open() fails with error code 4 (U_FILE_ACCESS_ERROR).

      https://qt.gitorious.org/qt/qtbase/source/c0a5e8c9d77aefd6c403af39908e56414a921522:src/corelib/tools/qcollator_icu.cpp#L56

        Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            • Assignee:
              liaqi Liang Qi
              Reporter:
              ngg Gergely Nagy
            • Votes:
              3 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Gerrit Reviews

                There are no open Gerrit changes