From f7d2a7cb9f7b8c4a42f3224dfcbeef0c35fceda2 Mon Sep 17 00:00:00 2001 From: gixxpunk Date: Wed, 28 Sep 2011 06:31:09 +0000 Subject: [PATCH] add better check to ensure logo is really PNG git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@1717 e54a6e83-5905-42d5-8d5c-058d10e6a962 Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/44bc69c4f5c851fc2fbec4e87553e5259db2d9e9 Author: gixxpunk Date: 2011-09-28 (Wed, 28 Sep 2011) Origin message was: ------------------ - add better check to ensure logo is really PNG git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@1717 e54a6e83-5905-42d5-8d5c-058d10e6a962 --- src/driver/pictureviewer/pictureviewer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/driver/pictureviewer/pictureviewer.cpp b/src/driver/pictureviewer/pictureviewer.cpp index ab4539640..0e29a745d 100644 --- a/src/driver/pictureviewer/pictureviewer.cpp +++ b/src/driver/pictureviewer/pictureviewer.cpp @@ -541,7 +541,7 @@ fb_pixel_t * CPictureViewer::getImage(const std::string & name, int width, int h return false; } #ifdef FBV_SUPPORT_PNG - if (name.find(".png") != std::string::npos) + if ((name.find(".png") == (name.length() - 4)) && (fh_png_id(name.c_str()))) load_ret = png_load_ext(name.c_str(), &buffer, &x, &y, &bpp); else #endif