$OpenBSD: patch-memcached_h,v 1.1 2009/08/07 10:46:41 jasper Exp $ --- memcached.h.orig Sat Jul 11 11:06:01 2009 +++ memcached.h Sat Jul 11 11:08:09 2009 @@ -99,9 +99,9 @@ /** Append an indexed stat with a stat name (with format), value format and value */ -#define APPEND_NUM_FMT_STAT(name_fmt, num, name, fmt, val) \ - klen = sprintf(key_str, name_fmt, num, name); \ - vlen = sprintf(val_str, fmt, val); \ +#define APPEND_NUM_FMT_STAT(name_fmt, num, name, fmt, val) \ + klen = snprintf(key_str, 128, name_fmt, num, name); \ + vlen = snprintf(val_str, 128, fmt, val); \ add_stats(key_str, klen, val_str, vlen, c); /** Common APPEND_NUM_FMT_STAT format. */