]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
typecheck-gcc.h: fix the OFF_T check
authorDaniel Stenberg <daniel@haxx.se>
Wed, 20 May 2020 08:07:58 +0000 (10:07 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 20 May 2020 08:08:54 +0000 (10:08 +0200)
The option number also needs to be less than CURLOPTTYPE_BLOB.

Follow-up to cac5374298
Reported-by: Jeroen Ooms
Bug: https://github.com/curl/curl/pull/5365#issuecomment-631084114

include/curl/typecheck-gcc.h

index 03c84fc85b2d5b0de873ea02857e556589938b04..7fcf54195aec5f894318663874aa0cc2944cf278 100644 (file)
@@ -7,7 +7,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
@@ -248,7 +248,7 @@ CURLWARNING(_curl_easy_getinfo_err_curl_off_t,
   (0 < (option) && (option) < CURLOPTTYPE_OBJECTPOINT)
 
 #define curlcheck_off_t_option(option)          \
-  ((option) > CURLOPTTYPE_OFF_T)
+  (((option) > CURLOPTTYPE_OFF_T) && ((option) < CURLOPTTYPE_BLOB))
 
 /* evaluates to true if option takes a char* argument */
 #define curlcheck_string_option(option)                                       \