src/server.c

changeset 2108
9871bfb94d6b
parent 2107
42cac4287fbb
child 2123
4cfdde0aa3f1
equal deleted inserted replaced
2107:42cac4287fbb 2108:9871bfb94d6b
405 new_conv = 1; 405 new_conv = 1;
406 406
407 /* plugin stuff. we pass a char ** but we don't want to pass what's been given us 407 /* plugin stuff. we pass a char ** but we don't want to pass what's been given us
408 * by the prpls. so we create temp holders and pass those instead. it's basically 408 * by the prpls. so we create temp holders and pass those instead. it's basically
409 * just to avoid segfaults. */ 409 * just to avoid segfaults. */
410 buffy = g_malloc(MAX(strlen(message), BUF_LONG)); 410 buffy = g_malloc(MAX(strlen(message) + 1, BUF_LONG));
411 strcpy(buffy, message); 411 strcpy(buffy, message);
412 angel = g_strdup(name); 412 angel = g_strdup(name);
413 plugin_return = plugin_event(event_im_recv, gc, &angel, &buffy, 0); 413 plugin_return = plugin_event(event_im_recv, gc, &angel, &buffy, 0);
414 414
415 if (!buffy || !angel || plugin_return) { 415 if (!buffy || !angel || plugin_return) {

mercurial