aboutsummaryrefslogtreecommitdiff
path: root/guilib
diff options
context:
space:
mode:
authorspiff <spiff@xbmc.org>2010-12-30 20:34:46 +0100
committerspiff <spiff@xbmc.org>2011-01-04 20:37:47 +0100
commitf95e9808803edb60d8d8847a608340c719d5a5f0 (patch)
tree1d8ba173afa58ca904efe9c642340e3b9b827aee /guilib
parent0dd85734ce4568db09f89e8806d2ba1b8cfcaa15 (diff)
fixed: realloc may not free stuff properly. check and abort. part of ticket #10929
Diffstat (limited to 'guilib')
-rw-r--r--guilib/GUIFontTTF.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/guilib/GUIFontTTF.cpp b/guilib/GUIFontTTF.cpp
index 7befa8609f..50e5eb213b 100644
--- a/guilib/GUIFontTTF.cpp
+++ b/guilib/GUIFontTTF.cpp
@@ -698,7 +698,14 @@ void CGUIFontTTFBase::RenderCharacter(float posX, float posY, const Character *c
if(m_vertex_count >= m_vertex_size)
{
m_vertex_size *= 2;
+ void* old = m_vertex;
m_vertex = (SVertex*)realloc(m_vertex, m_vertex_size * sizeof(SVertex));
+ if (!m_vertex)
+ {
+ free(old);
+ printf("realloc failed in CGUIFontTTF::RenderCharacter. aborting\n");
+ abort();
+ }
}
m_color = color;