summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Pointner <equinox@anytun.org>2018-06-08 18:48:22 +0200
committerChristian Pointner <equinox@anytun.org>2018-06-08 19:45:44 +0200
commitfefe6f78a67f2caf2125981724b154157a0247b4 (patch)
tree61c7bdc9df828649631ea6a9b91f80b5ecd28370
parentupdated version and rebuilt manpage (diff)
fix another off-by-one error in sprintf
-rw-r--r--src/log.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/log.c b/src/log.c
index b094d49..02208c6 100644
--- a/src/log.c
+++ b/src/log.c
@@ -265,7 +265,7 @@ void log_print_hex_dump(log_prio_t prio, const u_int8_t* buf, u_int32_t len)
for(i=0; i < len; i++) {
if(((i+1)*3) >= (MSG_LENGTH_MAX - offset))
break;
- snprintf(ptr, 3, "%02X ", buf[i]);
+ snprintf(ptr, 4, "%02X ", buf[i]);
ptr+=3;
}
}