mirror of
https://github.com/mirror/wget.git
synced 2025-03-14 20:00:15 +08:00
Correct segmentation fault when specifying a non-existing metalink file path/URL.
This commit is contained in:
parent
270460da98
commit
721697aef6
@ -1063,7 +1063,9 @@ retrieve_from_file (const char *file, bool html, int *count)
|
||||
input_file = (char *) file;
|
||||
|
||||
#ifdef ENABLE_METALINK
|
||||
if(opt.metalink_file)
|
||||
metalink_t *metalink;
|
||||
|
||||
if(opt.metalink_file && (metalink = metalink_context(input_file)))
|
||||
{
|
||||
/*GSoC wget*/
|
||||
char *temp, **files;
|
||||
@ -1074,14 +1076,11 @@ retrieve_from_file (const char *file, bool html, int *count)
|
||||
pthread_t thread;
|
||||
sem_t retr_sem;
|
||||
uerr_t status;
|
||||
metalink_t *metalink;
|
||||
metalink_file_t* file;
|
||||
metalink_resource_t* resource;
|
||||
struct s_thread_ctx *thread_ctx;
|
||||
struct range *ranges;
|
||||
|
||||
metalink = metalink_context(input_file);
|
||||
|
||||
thread_ctx = malloc (N_THREADS * (sizeof *thread_ctx));
|
||||
ranges = malloc (N_THREADS * (sizeof *ranges));
|
||||
files = malloc (N_THREADS * (sizeof *files));
|
||||
|
Loading…
Reference in New Issue
Block a user