On Sat, 17 Aug 2019 at 12:31, Jo-Philipp Wich <j...@mein.io> wrote:
> > [...]
> > +
> > +     blobmsg_for_each_attr(option, options, rem) {
> > +             const char *prefix = "UPGRADE_OPT_";
> > +             char *name = malloc(strlen(prefix) + 
> > strlen(blobmsg_name(option)));
> > +             char value[11];
> > +             char *c;
> > +             int tmp;
> > +
> > +             if (!name) {
> > +                     continue;
> > +             }
> > +             sprintf(name, "%s%s", prefix, blobmsg_name(option));
> > +             for (c = name + strlen(prefix); *c; c++) {
>
> I'd propose some more sanity checking here:

Pushed with your checks, thanks!

_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to