Просмотр исходного кода

ERR: We should really copy the address and not the value

Andy Cedilnik 23 лет назад
Родитель
Сommit
e031028e10
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      Source/CTest/Curl/formdata.c

+ 2 - 2
Source/CTest/Curl/formdata.c

@@ -876,10 +876,10 @@ CURLFORMcode FormAdd(struct curl_httppost **httppost,
       {
         /* this "cast increases required alignment of target type" but
            we consider it OK anyway */
-        struct curl_slist* list;
+        struct curl_slist* list=0;
         if ( array_state )
           {
-          memcpy(list, array_value, sizeof(struct curl_slist*));
+          memcpy(&list, &array_value, sizeof(struct curl_slist*));
           }
         else
           {