Skip to content

Commit

Permalink
fix: 修复漏洞 【CITIVD】Deepin-image-viewer-缓冲区溢出
Browse files Browse the repository at this point in the history
修复漏洞 【CITIVD】Deepin-image-viewer-缓冲区溢出

Bug: https://pms.uniontech.com/bug-view-259819.html
Log: 修复漏洞 【CITIVD】Deepin-image-viewer-缓冲区溢出
  • Loading branch information
myk1343 authored and starhcq committed Jun 17, 2024
1 parent 2a83b30 commit 591a23f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions libimageviewer/unionimage/unionimage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -547,6 +547,10 @@ UNIONIMAGESHARED_EXPORT FIBITMAP *QImge2FIBitMap(QImage img)
*/
UNIONIMAGESHARED_EXPORT FIBITMAP *readFile2FIBITMAP(const QString &path, int flags FI_DEFAULT(0))
{
QImage image(path);
if(image.isNull()) {//判断图片是否有效
return nullptr;
}
QByteArray b;
b.append(path);
const char *pc = b.data();
Expand Down

0 comments on commit 591a23f

Please sign in to comment.