Paul,

I'm a little bit confused about _strip_blob_prefix(). I assume, you want
to remove the leading '[' and the trailing ']' character from the subject?
But if that is the case, then will strncpy() never be called, because
strlen of tmp always is 0.

Please correct me, if my assumption is wrong.

Axel

...

static void _strip_blob_prefix(char *subject)
{
        char *tmp = g_strdup(subject);
        char *saved = tmp;
        if (*tmp == '[') {
                while (*tmp != '\0' && *tmp != ']')
                        tmp++;

                if (*tmp != ']') {
                        g_free(saved);
                        return;
                }

                g_strstrip(++tmp); // skip ']'

                if (strlen(tmp) > 0)
                        strncpy(subject,tmp,strlen(tmp)+1);

        }
        g_free(saved);
        return;
}

_______________________________________________
Dbmail-dev mailing list
Dbmail-dev@dbmail.org
http://twister.fastxs.net/mailman/listinfo/dbmail-dev

Reply via email to