X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=lib%2Fofp-print.c;fp=lib%2Fofp-print.c;h=0b8dc522d6e8e8cf6c8cfe77f72b684e0b5fee58;hb=716346cb67b705a164a2203ab38aefe4a84cd826;hp=7b3b77c52f514b19fc358d5180fec9fa8ced8ba9;hpb=83fbfe31465e47717226566a4fe69ce8b642a603;p=sliver-openvswitch.git diff --git a/lib/ofp-print.c b/lib/ofp-print.c index 7b3b77c52..0b8dc522d 100644 --- a/lib/ofp-print.c +++ b/lib/ofp-print.c @@ -933,11 +933,16 @@ ofp_desc_stats_reply(struct ds *string, const void *body, size_t len UNUSED, { const struct ofp_desc_stats *ods = body; - ds_put_format(string, "Manufacturer: %s\n", ods->mfr_desc); - ds_put_format(string, "Hardware: %s\n", ods->hw_desc); - ds_put_format(string, "Software: %s\n", ods->sw_desc); - ds_put_format(string, "Serial Num: %s\n", ods->serial_num); - ds_put_format(string, "DP Description: %s\n", ods->dp_desc); + ds_put_format(string, "Manufacturer: %.*s\n", + (int) sizeof ods->mfr_desc, ods->mfr_desc); + ds_put_format(string, "Hardware: %.*s\n", + (int) sizeof ods->hw_desc, ods->hw_desc); + ds_put_format(string, "Software: %.*s\n", + (int) sizeof ods->sw_desc, ods->sw_desc); + ds_put_format(string, "Serial Num: %.*s\n", + (int) sizeof ods->serial_num, ods->serial_num); + ds_put_format(string, "DP Description: %.*s\n", + (int) sizeof ods->dp_desc, ods->dp_desc); } static void