Signed-off-by: Sergey Ponomarev <[email protected]>
---
uclient-fetch.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/uclient-fetch.c b/uclient-fetch.c
index f9f0174..30440b3 100644
--- a/uclient-fetch.c
+++ b/uclient-fetch.c
@@ -650,6 +650,11 @@ int main(int argc, char **argv)
Since the first arg is program and
last is a URL.
But user may forget the URL and
raw_headers is null terminated so allocate argc */
raw_headers = calloc(argc, sizeof(char
*));
+ if (!raw_headers) {
+ if (!quiet)
+ fprintf(stderr, "Unable
to allocate memory for headers\n");
+ exit(1);
+ }
}
raw_headers[raw_headers_count] = optarg;
raw_headers_count++;
--
2.37.2
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel