From bbbd639fa96f11a6b8b46416845e6b0ae0881c31 Mon Sep 17 00:00:00 2001 From: Rob Norris Date: Thu, 28 Jun 2012 19:41:59 +0100 Subject: [PATCH 1/1] Fix potential crashing when using multiple maps on especially 64bit systems. Use correct type for returned function call, otherwise it can seemingly corrupt the copyrights list leading to undefined behaviour. --- src/vikviewport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vikviewport.c b/src/vikviewport.c index ce194c0a..d20254bf 100644 --- a/src/vikviewport.c +++ b/src/vikviewport.c @@ -1310,7 +1310,7 @@ void vik_viewport_add_copyright ( VikViewport *vp, const gchar *copyright ) g_return_if_fail ( vp != NULL ); if ( copyright ) { - gchar *found = (gchar*)g_slist_find_custom ( vp->copyrights, copyright, (GCompareFunc)strcmp ); + GSList *found = g_slist_find_custom ( vp->copyrights, copyright, (GCompareFunc)strcmp ); if ( found == NULL ) { gchar *duple = g_strdup ( copyright ); -- 2.39.5