LGTM
> On Feb 20, 2018, at 3:26 AM, Tobias Schramm <toblemi...@gmail.com> wrote: > > Add null pointer check to allocation of url filename > > Signed-off-by: Tobias Schramm <toblemi...@gmail.com> > --- > uclient-utils.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/uclient-utils.c b/uclient-utils.c > index a375eea..3eaf2d5 100644 > --- a/uclient-utils.c > +++ b/uclient-utils.c > @@ -178,7 +178,7 @@ char *uclient_get_url_filename(const char *url, const > char *default_name) > len -= str - url; > > if (len > 0) > - return strncpy(calloc(1, len + 1), str, len); > + return strndup(str, len); > > return strdup(default_name); > } > -- > 2.16.2 _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel