ossp-pkg/lmtp2nntp/lmtp2nntp_main.c 1.78 -> 1.79
--- lmtp2nntp_main.c 2004/04/02 10:35:40 1.78
+++ lmtp2nntp_main.c 2004/04/02 10:38:13 1.79
@@ -1466,8 +1466,8 @@
return LMTP_ERR_MEM;
}
}
- ctx->msg->azNewsgroups = memcpy(cp, ctx->msg->azEnvgroups, ctx->msg->asEnvgroups);
- ctx->msg->asNewsgroups = ctx->msg->asEnvgroups;
+ ctx->msg->azNewsgroups = memcpy(cp, ctx->msg->azEnvgroups != NULL ? ctx->msg->azEnvgroups : "", ctx->msg->asEnvgroups);
+ ctx->msg->asNewsgroups = ctx->msg->asEnvgroups;
}
else if (ctx->option_groupmode == GROUPMODE_ARG) {
if ((cp = malloc(ctx->asGroupargs + 1)) == NULL) {
@@ -1484,8 +1484,8 @@
return LMTP_ERR_MEM;
}
}
- ctx->msg->azNewsgroups = memcpy(cp, ctx->azGroupargs, ctx->asGroupargs);
- ctx->msg->asNewsgroups = ctx->asGroupargs;
+ ctx->msg->azNewsgroups = memcpy(cp, ctx->azGroupargs != NULL ? ctx->azGroupargs : "", ctx->asGroupargs);
+ ctx->msg->asNewsgroups = ctx->asGroupargs;
}
else { /* == GROUPMODE_HEADER */
cp = ctx->msg->azNewsgroups;
|
|