[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Wget-dev] wget2 | * tests/libtest.c: Create directories if needed w

From: DalmeGNU
Subject: Re: [Wget-dev] wget2 | * tests/libtest.c: Create directories if needed when creating WGET_TEST_EXISTING_FILES (!440)
Date: Thu, 22 Aug 2019 12:43:33 +0000

DalmeGNU commented on a discussion on tests/libtest.c: 

>               // create files
>               if (existing_files) {
>                       for (it = 0; existing_files[it].name; it++) {
> +                             const char *namecpy = 
> wget_strdup(existing_files[it].name);

Yes, but it modifies the string changing '/' to character 0 and then it turns 
it back to '/'. And existing_files[it].name is a pointer got from a va_list 
using va_arg(), thus the memory it points to cannot be modified and if you try 
you'll get a segmention fault

Reply to this email directly or view it on GitLab: 
You're receiving this email because of your account on gitlab.com.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]