diff options
author | gimli <ebsi4711@gmail.com> | 2012-08-29 06:33:21 +0200 |
---|---|---|
committer | gimli <ebsi4711@gmail.com> | 2012-08-29 06:33:21 +0200 |
commit | 9cbb2729a43c4a196b60c87acc33d8c890c4054a (patch) | |
tree | a30a14e3f0287b3a19c7463d27c54e75743f2e1e | |
parent | 6bf5c0e12409a56564deaccb753e1357b32fd897 (diff) |
[rbp] fixed possible overread in texture loading.
-rw-r--r-- | xbmc/guilib/Texture.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/xbmc/guilib/Texture.cpp b/xbmc/guilib/Texture.cpp index bb33dd4fca..f8557a5b30 100644 --- a/xbmc/guilib/Texture.cpp +++ b/xbmc/guilib/Texture.cpp @@ -268,8 +268,8 @@ bool CBaseTexture::LoadFromFile(const CStdString& texturePath, unsigned int maxW if(omx_image.GetDecodedData()) { - int size = ( (GetPitch() * GetRows() ) < omx_image.GetDecodedSize() ) ? - GetPitch() * GetRows() : omx_image.GetDecodedSize(); + int size = ( ( GetPitch() * GetRows() ) > omx_image.GetDecodedSize() ) ? + omx_image.GetDecodedSize() : ( GetPitch() * GetRows() ); memcpy(m_pixels, (unsigned char *)omx_image.GetDecodedData(), size); } |