Comment 5 for bug 740754

Revision history for this message
Martin Pitt (pitti) wrote :

Gunnar,

returning a pointer to a static array on the stack will cause the crash. Can you please try with

  char *langlist, *language;

  [...]

    if (langlist != NULL && strlen(langlist) > 0) {
        char *colon = index (langlist, ':');
        if (colon)
            language = g_strndup (langlist, colon - langlist);
        else
            language = g_strdup (langlist);

        return language;
    }