Skip to content

Commit

Permalink
version: the real 1.2.9, fix another bug from buf.c when input is lon…
Browse files Browse the repository at this point in the history
…ger than buffer size
  • Loading branch information
HardySimpson committed Feb 7, 2013
1 parent c351807 commit 57ca747
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion src/buf.c
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ int zlog_buf_vprintf(zlog_buf_t * a_buf, const char *format, va_list args)
if (rc > 0) {
zc_error("conf limit to %ld, can't extend, so truncate", a_buf->size_max);
va_copy(ap, args);
size_left = a_buf->end_plus_1 - a_buf->start;
size_left = a_buf->end_plus_1 - a_buf->tail;
vsnprintf(a_buf->tail, size_left, format, ap);
a_buf->tail += size_left - 1;
//*(a_buf->tail) = '\0';
Expand Down
1 change: 0 additions & 1 deletion src/zlog.c
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,6 @@ int dzlog_set_category(const char *cname)
} \
} \
\
zc_error("%d, %d", a_thread->init_version, zlog_env_init_version); \
if (a_thread->init_version != zlog_env_init_version) { \
/* as mdc is still here, so can not easily del and new */ \
rd = zlog_thread_rebuild_msg_buf(a_thread, \
Expand Down

0 comments on commit 57ca747

Please sign in to comment.