From: Ben Pfaff Date: Fri, 27 Feb 2009 00:20:00 +0000 (-0800) Subject: dpctl: Don't print trailing garbage in "dpctl status" output. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=73159c5a7e7dea9d78b35968376607ae7fe867c7;p=openvswitch dpctl: Don't print trailing garbage in "dpctl status" output. --- diff --git a/utilities/dpctl.c b/utilities/dpctl.c index 60c5f189..94283c73 100644 --- a/utilities/dpctl.c +++ b/utilities/dpctl.c @@ -506,7 +506,7 @@ do_status(const struct settings *s UNUSED, int argc, char *argv[]) ofp_fatal(0, "bad reply"); } - fwrite(reply + 1, b->size, 1, stdout); + fwrite(reply + 1, b->size - sizeof *reply, 1, stdout); } static void