X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=lib%2Froute-table.c;h=64a5c1e9ba388a389e1810fe54b1a436acc6fb9d;hb=3394b5b69070b0aef4fc3231ca28bdf09bc0a0d2;hp=29d81bb39bba7fe375ba92a3a5970f8e10ecc3a2;hpb=b46ccdf582946f30d80735345c533c23a7f035c0;p=openvswitch diff --git a/lib/route-table.c b/lib/route-table.c index 29d81bb3..64a5c1e9 100644 --- a/lib/route-table.c +++ b/lib/route-table.c @@ -446,7 +446,7 @@ name_table_reset(void) nn = xzalloc(sizeof *nn); nn->ifi_index = change.ifi_index; strncpy(nn->ifname, change.ifname, IFNAMSIZ); - nn->ifname[IFNAMSIZ] = '\0'; + nn->ifname[IFNAMSIZ - 1] = '\0'; hmap_insert(&name_map, &nn->node, hash_int(nn->ifi_index, 0)); } }