Blame SOURCES/0003-python-pycurl-7.43.0.2-decode-cookie-info.patch

3153ed
From f5141d34f54ec2ae3309324a99f0f5887f0a8201 Mon Sep 17 00:00:00 2001
3153ed
From: Dmitriy Taychenachev <dmitriy.taychenachev@skypicker.com>
3153ed
Date: Tue, 9 Apr 2019 11:23:58 +0200
3153ed
Subject: [PATCH] decode_string_list: fix populating list of decoded strings
3153ed
3153ed
Under Python3 the call curl.getinfo(pycurl.INFO_COOKIELIST) returns
3153ed
invalid list (for example [<NULL>]), which cases segmentation fault.
3153ed
The cause is in function decode_string_list() (Python3 only) which
3153ed
creates new list without populating it with elements. This commit
3153ed
adds the setting of elements fixing the behaviour.
3153ed
3153ed
Upstream-commit: 5df7a0e5bb38a3db5f04721add571cd32c5e3eb8
3153ed
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
3153ed
---
3153ed
 src/easyinfo.c | 1 +
3153ed
 1 file changed, 1 insertion(+)
3153ed
3153ed
diff --git a/src/easyinfo.c b/src/easyinfo.c
3153ed
index b3d731b..3712646 100644
3153ed
--- a/src/easyinfo.c
3153ed
+++ b/src/easyinfo.c
3153ed
@@ -277,6 +277,7 @@ decode_string_list(PyObject *list)
3153ed
         if (decoded_item == NULL) {
3153ed
             goto err;
3153ed
         }
3153ed
+	PyList_SetItem(decoded_list, i, decoded_item);
3153ed
     }
3153ed
     
3153ed
     return decoded_list;
3153ed
-- 
3153ed
2.21.1
3153ed