summaryrefslogtreecommitdiffstats
path: root/runtime/string.c
diff options
context:
space:
mode:
authorhunt <hunt>2007-01-30 19:18:06 +0000
committerhunt <hunt>2007-01-30 19:18:06 +0000
commiteaa5bbf4b8703e3794943f27d3fb9c1265dfd418 (patch)
tree354d34ca2b46ddd86f0f5de26345ce4fc753d6a9 /runtime/string.c
parentd21d36c05265b136246ae2c4ee9b5a38af46f45c (diff)
downloadsystemtap-steved-eaa5bbf4b8703e3794943f27d3fb9c1265dfd418.tar.gz
systemtap-steved-eaa5bbf4b8703e3794943f27d3fb9c1265dfd418.tar.xz
systemtap-steved-eaa5bbf4b8703e3794943f27d3fb9c1265dfd418.zip
2007-01-30 Martin Hunt <hunt@redhat.com>
* io.c (_stp_vlog): Use dynamic percpu allocations instead of very wasteful static allocations. * print.c (_stp_print_init): Do percpu allocations for io.c. (_stp_print_cleanup): Free percpu allocations. * string.c (_stp_sprintf): Overflow check needed to be >= instead of >.
Diffstat (limited to 'runtime/string.c')
-rw-r--r--runtime/string.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/string.c b/runtime/string.c
index 6615d741..b740c064 100644
--- a/runtime/string.c
+++ b/runtime/string.c
@@ -64,7 +64,7 @@ void _stp_sprintf (String str, const char *fmt, ...)
va_start(args, fmt);
num = _stp_vsnprintf(buf, size, fmt, args);
va_end(args);
- if (unlikely(num > size)) {
+ if (unlikely(num >= size)) {
/* overflowed the buffer */
if (pb->len == 0) {
/* A single print request exceeded the buffer size. */