~ruther/guix-local

ref: 2f837cf7fe100b0584fb02cf8f19d4cfb4e14d88 guix-local/gnu/packages/patches/curl-bounds-check.patch -rw-r--r-- 617 bytes
2f837cf7 — Marius Bakke gnu: perl: Add more missing dependencies on Module::Install. 8 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Fix test failure on some 32-bit platforms.

Patch copied from upstream source repository:

https://github.com/curl/curl/commit/45a560390c4356bcb81d933bbbb229c8ea2acb63

diff --git a/src/tool_paramhlp.c b/src/tool_paramhlp.c
index b9dedc989e..85c5e79a7e 100644
--- a/src/tool_paramhlp.c
+++ b/src/tool_paramhlp.c
@@ -218,7 +218,7 @@ static ParameterError str2double(double *val, const char *str, long max)
     num = strtod(str, &endptr);
     if(errno == ERANGE)
       return PARAM_NUMBER_TOO_LARGE;
-    if((long)num > max) {
+    if(num > max) {
       /* too large */
       return PARAM_NUMBER_TOO_LARGE;
     }