char *outbuf, *c;
ctx = o->internal;
- outsize = strlen(ctx->header);
+
+ outsize = 0;
+ if (ctx->header)
+ outsize = strlen(ctx->header);
outbuf = calloc(1, outsize + 1 + 10000); /* FIXME: Use realloc(). */
if (outbuf == NULL)
return SIGROK_ERR_MALLOC;
char *outbuf, *c;
ctx = o->internal;
- outsize = strlen(ctx->header);
+ outsize = 0;
+ if (ctx->header)
+ outsize = strlen(ctx->header);
outbuf = calloc(1, outsize + 1 + 10000); /* FIXME: Use realloc(). */
if (outbuf == NULL)
return SIGROK_ERR_MALLOC;