This is the function in the code the panic log is referring to. The line being referred to in panic logs is buf = sstrdup(fmt);. A friend of mine who has some coding experience reckons that the data being called is null, causing the panic, but that's just a guess.
void my_memo_lang(User * u, char *name, int z, int number, ...)
{
va_list va;
char buffer[4096], outbuf[4096];
char *fmt = NULL;
int lang = LANG_EN_US;
char *s, *t, *buf;
User *u2;
if ((mod_current_module_name)
&& (!mod_current_module
|| strcmp(mod_current_module_name, mod_current_module->name)))
mod_current_module = findModule(mod_current_module_name);
u2 = finduser(name);
/* Find the users lang, and use it if we cant */
if (u2 && u2->na && u2->na->nc)
lang = u2->na->nc->language;
/* If the users lang isnt supported, drop back to enlgish */
if (mod_current_module->lang[lang].argc == 0)
lang = LANG_EN_US;
/* If the requested lang string exists for the language */
if (mod_current_module->lang[lang].argc > number) {
fmt = mod_current_module->lang[lang].argv[number];
buf = sstrdup(fmt);
s = buf;
while (*s) {
t = s;
s += strcspn(s, "\n");
if (*s)
*s++ = '\0';
strscpy(outbuf, t, sizeof(outbuf));
va_start(va, number);
vsnprintf(buffer, 4095, outbuf, va);
va_end(va);
memo_send(u, name, buffer, z);
}
free(buf);
} else {
alog("%s: INVALID language string call, language: [%d], String [%d]", mod_current_module->name, lang, number);
}
}
[Edited on 21-4-2006 by Currawong]