null+****@clear*****
null+****@clear*****
2011年 2月 18日 (金) 14:26:32 JST
Kouhei Sutou 2011-02-18 05:26:32 +0000 (Fri, 18 Feb 2011)
New Revision: 21a1210bc29553f221057da58f159e453e7ebbdd
Log:
ensure using the last byte in error message buffer.
Modified files:
lib/ctx.c
Modified: lib/ctx.c (+1 -2)
===================================================================
--- lib/ctx.c 2011-02-18 03:03:17 +0000 (cbbbaa8)
+++ lib/ctx.c 2011-02-18 05:26:32 +0000 (269adc2)
@@ -2388,9 +2388,8 @@ grn_ctx_log(grn_ctx *ctx, char *fmt, ...)
{
va_list argp;
va_start(argp, fmt);
- vsnprintf(ctx->errbuf, GRN_CTX_MSGSIZE - 1, fmt, argp);
+ vsnprintf(ctx->errbuf, GRN_CTX_MSGSIZE, fmt, argp);
va_end(argp);
- ctx->errbuf[GRN_CTX_MSGSIZE - 1] = '\0';
}
void