diff options
Diffstat (limited to 'src/obj/ct_helper.c')
-rw-r--r-- | src/obj/ct_helper.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/obj/ct_helper.c b/src/obj/ct_helper.c index d6d3111..62569fe 100644 --- a/src/obj/ct_helper.c +++ b/src/obj/ct_helper.c @@ -185,6 +185,9 @@ static int nftnl_obj_ct_helper_snprintf(char *buf, size_t len, uint32_t type, uint32_t flags, const struct nftnl_obj *e) { + if (len) + buf[0] = '\0'; + switch (type) { case NFTNL_OUTPUT_DEFAULT: return nftnl_obj_ct_helper_snprintf_default(buf, len, e); |