File: fix-curl_easy_getinfo-invocation.patch

package info (click to toggle)
dirb 2.22%2Bdfsg-7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,244 kB
  • sloc: ansic: 1,704; sh: 1,132; makefile: 51; perl: 23
file content (24 lines) | stat: -rw-r--r-- 879 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Description: fix invocation of curl_easy_getinfo()
 curl_easy_getinfo() expects a pointer to a long while the upstream code
 provides a pointer to an int. This patch first provides a pointer to a interim
 variable of type long, then converts the result to int and finally stores it
 in the structure intended by upstream. 
 Without this patch autopkgtest fails on big-endian architectures.
Author: Sven Geuer <sge@debian.org
Forwarded: not-needed
Last-Update: 2025-04-14
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/src/get_url.c
+++ b/src/get_url.c
@@ -101,7 +101,9 @@
 
     estructura.estado=curl_easy_perform(curl);
 
-    curl_easy_getinfo(curl, CURLINFO_HTTP_CODE, &estructura.codigo_http);
+    long http_code;
+    curl_easy_getinfo(curl, CURLINFO_HTTP_CODE, &http_code);
+	estructura.codigo_http=(int)(http_code & 0xFFFF);
 
   } else {