- Add fix-docx-format.patch * Deal with docx document format (boo#1218382 and CVE-2023-50254) OBS-URL: https://build.opensuse.org/request/show/1134989 OBS-URL: https://build.opensuse.org/package/show/X11:Deepin/deepin-reader?expand=0&rev=14
24 lines
979 B
Diff
24 lines
979 B
Diff
diff -Nur deepin-reader-5.10.23/reader/document/Model.cpp deepin-reader-5.10.23-new/reader/document/Model.cpp
|
|
--- deepin-reader-5.10.23/reader/document/Model.cpp 2022-08-02 13:40:01.000000000 +0800
|
|
+++ deepin-reader-5.10.23-new/reader/document/Model.cpp 2023-12-24 21:23:03.619056072 +0800
|
|
@@ -9,6 +9,7 @@
|
|
#include <QFile>
|
|
#include <QDir>
|
|
#include <QTimer>
|
|
+#include <QTemporaryFile>
|
|
|
|
namespace deepin_reader {
|
|
deepin_reader::Document *deepin_reader::DocumentFactory::getDocument(const int &fileType,
|
|
@@ -70,7 +71,10 @@
|
|
return nullptr;
|
|
}
|
|
qInfo() << "(" << targetDoc << ")文档解压 已完成";
|
|
-
|
|
+ QTemporaryFile tmpFile(convertedFileDir + "/word/" + QCoreApplication::applicationName() + "_XXXXXX.html");
|
|
+ if( tmpFile.open()) { //fix 232871
|
|
+ tmpHtmlFilePath = tmpFile.fileName(); // returns the unique file name
|
|
+ }
|
|
// docx -> html
|
|
QProcess converter;
|
|
*pprocess = &converter;
|