Skip to content
  • Matěj Laitl's avatar
    AudioCdCollection: don't create a reference out of temporary var (crashfix) · a3d378de
    Matěj Laitl authored
    There's following code in AudioCdCollection::updateProxyTracks():
    const QString &urlString = url.url().remove( "audiocd:/" );
    
    Which I think is wrong, because url.url() returns a temporary QString
    and QString::remove() returns a reference to itself. However, the
    temporary is AFAICS destroyed as soon as this line ends. This IMO
    results in urlString being an invalid reference.
    
    I'm not really sure about this, I haven't read C++ spec, but given many
    users report crash on the following line, this could be the culprit.
    I was never able to reproduce the bug, so I'm shooting blindly.
    
    Reporters, please test reproducibility with current git and reopen if
    this is not fixed.
    
    BUG: 256585
    FIXED-IN: 2.6
    DIGEST: fix grave crash
    a3d378de
To find the state of this project's repository at the time of any of these versions, check out the tags.