diff --git a/samples/webclient_shard_download_sample.c b/samples/webclient_shard_download_sample.c index 5a6d2e2..d60c283 100644 --- a/samples/webclient_shard_download_sample.c +++ b/samples/webclient_shard_download_sample.c @@ -57,8 +57,9 @@ int webclient_shard_download_test(int argc, char **argv) struct webclient_session* session = RT_NULL; rt_err_t result = RT_EOK; char *uri = RT_NULL; - int length, size = 0; + int length = 0; int usage_flag = 0; + int size = 200; if (argc == 1) diff --git a/src/webclient.c b/src/webclient.c index dac2bca..df4716e 100644 --- a/src/webclient.c +++ b/src/webclient.c @@ -1050,6 +1050,7 @@ int webclient_shard_position_function(struct webclient_session *session, const c RT_ASSERT(session); RT_ASSERT(URI); + RT_ASSERT(mem_size); /* set the offset of "Range" and "total_len" */ end_position = start;