Rui Salvaterra <rsalvate...@gmail.com> [2020-01-16 21:16:43]: Hi,
> +fw3_has_target(const char *target) > +{ > + FILE *f; > + > + char line[12]; > + bool seen = false; > + > + const char *path = "/proc/net/ip_tables_targets"; > + > + if (!(f = fopen(path, "r"))) > + return false; > + > + while (fgets(line, sizeof(line), f)) > + { > + if (!strncmp(line, target, strlen(target))) This doesn't seem right to me in case target > 12, MIN(sizeof(line), strlen(target)) perhaps? -- ynezz _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel