From 2dbe7d7cfc591e4e279f91409dca92f235b92c1b Mon Sep 17 00:00:00 2001 From: Thomas Graf Date: Sun, 10 Apr 2011 10:18:04 +0200 Subject: [PATCH] Initialize dump buffer in case caller missed it (Set an end to all the bug reports of applications failing to do so.) --- lib/utils.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/utils.c b/lib/utils.c index 8756318..4d29ebb 100644 --- a/lib/utils.c +++ b/lib/utils.c @@ -1000,6 +1000,9 @@ void dump_from_ops(struct nl_object *obj, struct nl_dump_params *params) params->dp_pre_dump = 1; } + if (params->dp_buf) + memset(params->dp_buf, 0, params->dp_buflen); + if (obj->ce_ops->oo_dump[type]) obj->ce_ops->oo_dump[type](obj, params); }