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

QFontEngineQPF2::findGlyph possible SEGFAULT

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Duplicate
    • Not Evaluated
    • None
    • None
    • GUI: Font handling
    • None
    • Linux/Other display system

    Description

      See this issue first https://bugreports.qt.io/browse/QTBUG-41355

      I want to play the role of an archaeologist a bit. 

      So we were faced with the crash in Qt4 in QFontEngineQPF::recaltAdvanced.

      The suggested fix works, but I have found qt5 sources still have the same code at 

       

      const QFontEngineQPF2::Glyph *QFontEngineQPF2::findGlyph(glyph_t g) const
      
      
      if (glyphPos > glyphDataSize) {             /// MARK#1
              if (glyphPos == 0xffffffff)
                  return 0;
      #if defined(DEBUG_FONTENGINE)
              qDebug() << "glyph" << g << "outside of glyphData, remapping font file";
      #endif
              if (glyphPos > glyphDataSize)      /// MARK#2
                  return 0;
          }
          return reinterpret_cast<const Glyph *>(fontData + glyphDataOffset + glyphPos);
      

      So, is that possible to say we are saved if apply `if (glyphPos >= glyphDataSize)` ? 

      Does it applicable for qt6?

       

      Attachments

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

        Activity

          People

            esabraha Eskil Abrahamsen Blomfeldt
            pavloshyba Pavlo Shyba
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes