String handling in JS bridge changed to safer glib functions. Added path sanitization.

This commit is contained in:
Matthew Bowra-Dean
2010-12-31 17:46:41 +13:00
committed by Chris Forbes
parent 0a1e6d16bd
commit 44fae60dbd
2 changed files with 210 additions and 180 deletions

View File

@@ -249,7 +249,7 @@ void last_mod_callback(GPid pid, gint status, gpointer data)
if (!msg)
return;
if (0 == strcmp(msg->str, "Error:"))
if (g_str_has_prefix(msg->str, "Error:"))
{
g_string_truncate(msg, 2);
g_string_overwrite(msg, 0, "ra");