aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Marshall <jmarshall@never.you.mind>2013-01-06 15:13:04 +1300
committerS. Davilla <davilla@4pi.com>2013-01-06 08:35:53 -0500
commit76243b8b59806a43df7d1715af48aab54479a4f8 (patch)
treec29e00b83b047bf96150eb3511e94c7cc97326ac
parentc0148946a061fdc237c8babd6d3eb53cac1c22ef (diff)
use safe decompression for lzo'd textures to avoid a crash on corrupt textures. The decompression is only fractionally slower
-rw-r--r--xbmc/guilib/TextureBundleXBT.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/xbmc/guilib/TextureBundleXBT.cpp b/xbmc/guilib/TextureBundleXBT.cpp
index 9888e097aa..3e7fc8f084 100644
--- a/xbmc/guilib/TextureBundleXBT.cpp
+++ b/xbmc/guilib/TextureBundleXBT.cpp
@@ -220,7 +220,7 @@ bool CTextureBundleXBT::ConvertFrameToTexture(const CStdString& name, CXBTFFrame
return false;
}
lzo_uint s = (lzo_uint)frame.GetUnpackedSize();
- if (lzo1x_decompress(buffer, (lzo_uint)frame.GetPackedSize(), unpacked, &s, NULL) != LZO_E_OK ||
+ if (lzo1x_decompress_safe(buffer, (lzo_uint)frame.GetPackedSize(), unpacked, &s, NULL) != LZO_E_OK ||
s != frame.GetUnpackedSize())
{
CLog::Log(LOGERROR, "Error loading texture: %s: Decompression error", name.c_str());