From 4ea83d5fe1df7942ca1eabf5fb88dbb72dc15661 Mon Sep 17 00:00:00 2001 From: trialuser02 Date: Fri, 20 Dec 2019 21:14:04 +0000 Subject: fixed crash on encrypted archives (#1027) git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@9155 90c681e8-e032-0410-971d-27865f9a5e38 --- src/plugins/Input/archive/decoderarchivefactory.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/plugins/Input/archive/decoderarchivefactory.cpp') diff --git a/src/plugins/Input/archive/decoderarchivefactory.cpp b/src/plugins/Input/archive/decoderarchivefactory.cpp index e96bbf007..6f6d0bf87 100644 --- a/src/plugins/Input/archive/decoderarchivefactory.cpp +++ b/src/plugins/Input/archive/decoderarchivefactory.cpp @@ -80,8 +80,17 @@ QList DecoderArchiveFactory::createPlayList(const QString &path, Tr qWarning("DecoderArchiveFactory: unable to open archive; libarchive error: %s", archive_error_string(a)); return list; } + while (archive_read_next_header(a, &entry) == ARCHIVE_OK) { + if(archive_read_has_encrypted_entries(a) == 1) //skip encrypted archives + { + qDeleteAll(list); + list.clear(); + archive_read_free(a); + return list; + } + if(archive_entry_filetype(entry) == AE_IFREG) { QString filePath = QString::fromLocal8Bit(archive_entry_pathname(entry)); -- cgit v1.2.3-13-gbd6f