X-Git-Url: https://git.archive.openwrt.org/?p=project%2Fnetifd.git;a=blobdiff_plain;f=ubus.c;h=d8768241d2f614aeb789d1affe90cc8ba5a68793;hp=22b75e4073b24a1cf6d504c1199eaa04c8b58f50;hb=8495bc0176185ca77eae770a33b3463ca2bc0f25;hpb=1ed34c73c45ee55fd677e8bb2a14e1fb83da26b4 diff --git a/ubus.c b/ubus.c index 22b75e4..d876824 100644 --- a/ubus.c +++ b/ubus.c @@ -497,7 +497,7 @@ interface_ip_dump_route_list(struct interface_ip_settings *ip, bool enabled) buf = blobmsg_alloc_string_buffer(&b, "source", buflen); inet_ntop(af, &route->source, buf, buflen); - snprintf(buf + strlen(buf), 4, "/%u", route->sourcemask); + snprintf(buf + strlen(buf), buflen - strlen(buf), "/%u", route->sourcemask); blobmsg_add_string_buffer(&b); blobmsg_close_table(&b, r);