diff options
author | Christian Pointner <equinox@anytun.org> | 2017-09-18 23:26:22 +0200 |
---|---|---|
committer | Christian Pointner <equinox@anytun.org> | 2017-09-18 23:26:22 +0200 |
commit | 8f909e17325c7aca818bfdf17179c7a426498a85 (patch) | |
tree | 0506e4250a0a557853e92f6cd1828489e5724f2a /src/log.c | |
parent | source init-functions at initscript (diff) |
added testvector programmkd-testvectors
Diffstat (limited to 'src/log.c')
-rw-r--r-- | src/log.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -263,9 +263,9 @@ void log_print_hex_dump(log_prio_t prio, const u_int8_t* buf, u_int32_t len) char* ptr = &msg[offset]; for(i=0; i < len; i++) { - if(((i+1)*3) >= (MSG_LENGTH_MAX - offset)) + if(((i+1)*3) >= (MSG_LENGTH_MAX - offset - 1)) break; - snprintf(ptr, 3, "%02X ", buf[i]); + snprintf(ptr, 4, "%02X ", buf[i]); ptr+=3; } } |