From e94dc0ca61c574ddd784cfcc3fec522b480016d3 Mon Sep 17 00:00:00 2001 From: Simon Marchetto Date: Mon, 16 Jun 2014 12:07:09 +0200 Subject: [PATCH] scilab: fix range checking in swig_this() --- Lib/scilab/scirun.swg | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Lib/scilab/scirun.swg b/Lib/scilab/scirun.swg index fadac8e6a..d6a224c77 100644 --- a/Lib/scilab/scirun.swg +++ b/Lib/scilab/scirun.swg @@ -263,6 +263,7 @@ SWIG_Scilab_Raise(const int obj, const char *type, swig_type_info *descriptor) { * Pointer utility functions */ + #ifdef __cplusplus extern "C" #endif @@ -296,7 +297,7 @@ int swig_ptr(SWIG_GatewayParameters) { Scierror(999, _("%s: Incorrect value for input argument #%d: The double value cannot be converted to a pointer.\n"), fname, 1); return SWIG_ValueError; } - if ((dValue < LONG_MIN) || (dValue > LONG_MAX)) { + if ((dValue < 0) || (dValue > ULONG_MAX)) { Scierror(999, _("%s: Overflow error for input argument #%d: The double value cannot be converted to a pointer.\n"), fname, 1); return SWIG_OverflowError; }