libtasn1-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] GNU libtasn1 branch, master, updated. libtasn1_3_2-3-g40ea6d9


From: Nikos Mavrogiannopoulos
Subject: [SCM] GNU libtasn1 branch, master, updated. libtasn1_3_2-3-g40ea6d9
Date: Tue, 01 Jan 2013 11:26:49 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU libtasn1".

http://git.savannah.gnu.org/cgit/libtasn1.git/commit/?id=40ea6d9515d7436cfadb85d21cdf5a6539698759

The branch, master has been updated
       via  40ea6d9515d7436cfadb85d21cdf5a6539698759 (commit)
       via  d5a6c73d9e02d0745a456f5a5eb121e03051b349 (commit)
      from  b2bcc5fc8e9c2aea25f1209a550328b71c242776 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 40ea6d9515d7436cfadb85d21cdf5a6539698759
Author: Nikos Mavrogiannopoulos <address@hidden>
Date:   Tue Jan 1 12:24:38 2013 +0100

    More precise overflow checks using gnulib's intprops module.

commit d5a6c73d9e02d0745a456f5a5eb121e03051b349
Author: Nikos Mavrogiannopoulos <address@hidden>
Date:   Tue Jan 1 11:56:27 2013 +0100

    Added intprops

-----------------------------------------------------------------------

Summary of changes:
 Makefile.am                     |    3 +
 NEWS                            |    3 +
 build-aux/snippet/arg-nonnull.h |    2 +-
 build-aux/snippet/c++defs.h     |    2 +-
 build-aux/snippet/warn-on-use.h |    4 +-
 lib/decoding.c                  |   78 ++++++----
 lib/gllib/Makefile.am           |   11 +-
 lib/gllib/hash-pjw-bare.c       |    2 +-
 lib/gllib/hash-pjw-bare.h       |    2 +-
 lib/gllib/intprops.h            |  319 +++++++++++++++++++++++++++++++++++++++
 lib/gllib/stddef.in.h           |    2 +-
 lib/gllib/stdint.in.h           |    2 +-
 lib/gllib/string.in.h           |    2 +-
 lib/gllib/strverscmp.c          |    2 +-
 lib/glm4/00gnulib.m4            |    2 +-
 lib/glm4/extensions.m4          |    2 +-
 lib/glm4/gnulib-cache.m4        |    5 +-
 lib/glm4/gnulib-common.m4       |    8 +-
 lib/glm4/gnulib-comp.m4         |    4 +-
 lib/glm4/gnulib-tool.m4         |    2 +-
 lib/glm4/include_next.m4        |    2 +-
 lib/glm4/ld-version-script.m4   |    2 +-
 lib/glm4/longlong.m4            |    2 +-
 lib/glm4/multiarch.m4           |    2 +-
 lib/glm4/stddef_h.m4            |    2 +-
 lib/glm4/stdint.m4              |    2 +-
 lib/glm4/string_h.m4            |    2 +-
 lib/glm4/strverscmp.m4          |    2 +-
 lib/glm4/visibility.m4          |    2 +-
 lib/glm4/warn-on-use.m4         |    2 +-
 lib/glm4/wchar_t.m4             |    2 +-
 tests/Test_overflow.c           |    2 +-
 32 files changed, 415 insertions(+), 66 deletions(-)
 create mode 100644 lib/gllib/intprops.h

diff --git a/Makefile.am b/Makefile.am
index c84b629..854dbdb 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -31,3 +31,6 @@ SUBDIRS = gl lib src examples tests doc
 ACLOCAL_AMFLAGS = -I m4 -I gl/m4 -I lib/glm4
 
 EXTRA_DIST += cfg.mk maint.mk .clcopying
+
+gnulib-update:
+       gnulib-tool --add-import --dir=. --lib=libgnu --source-base=lib/gllib 
--m4-base=lib/glm4 --doc-base=doc --tests-base=tests --aux-dir=build-aux 
--lgpl=2 --no-conditional-dependencies --libtool --macro-prefix=lgl 
--no-vc-files
diff --git a/NEWS b/NEWS
index 6fa0d12..54aa7d9 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,8 @@
 GNU Libtasn1 NEWS                                     -*- outline -*-
 
+* Noteworthy changes in release 3.3 (unreleased) [stable]
+- More precise overflow checks using gnulib's intprops module.
+
 * Noteworthy changes in release 3.2 (released 2012-11-30) [stable]
 - Corrected buffer overflow in the error reporting of the parser (reported
 by Andreas Metzler).
diff --git a/build-aux/snippet/arg-nonnull.h b/build-aux/snippet/arg-nonnull.h
index 3a9dd26..8ea2a47 100644
--- a/build-aux/snippet/arg-nonnull.h
+++ b/build-aux/snippet/arg-nonnull.h
@@ -1,5 +1,5 @@
 /* A C macro for declaring that specific arguments must not be NULL.
-   Copyright (C) 2009-2012 Free Software Foundation, Inc.
+   Copyright (C) 2009-2013 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify it
    under the terms of the GNU General Public License as published
diff --git a/build-aux/snippet/c++defs.h b/build-aux/snippet/c++defs.h
index 96da94b..b35b933 100644
--- a/build-aux/snippet/c++defs.h
+++ b/build-aux/snippet/c++defs.h
@@ -1,5 +1,5 @@
 /* C++ compatible function declaration macros.
-   Copyright (C) 2010-2012 Free Software Foundation, Inc.
+   Copyright (C) 2010-2013 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify it
    under the terms of the GNU General Public License as published
diff --git a/build-aux/snippet/warn-on-use.h b/build-aux/snippet/warn-on-use.h
index d4cb94f..1736a1b 100644
--- a/build-aux/snippet/warn-on-use.h
+++ b/build-aux/snippet/warn-on-use.h
@@ -1,5 +1,5 @@
 /* A C macro for emitting warnings if a function is used.
-   Copyright (C) 2010-2012 Free Software Foundation, Inc.
+   Copyright (C) 2010-2013 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify it
    under the terms of the GNU General Public License as published
@@ -55,7 +55,7 @@
    rather than issue the nice warning, but the end result of informing
    the developer about their portability problem is still achieved):
    #if HAVE_RAW_DECL_ENVIRON
-   static inline char ***rpl_environ (void) { return &environ; }
+   static char ***rpl_environ (void) { return &environ; }
    _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared");
    # undef environ
    # define environ (*rpl_environ ())
diff --git a/lib/decoding.c b/lib/decoding.c
index f02fe10..c522c5d 100644
--- a/lib/decoding.c
+++ b/lib/decoding.c
@@ -26,11 +26,12 @@
 /*****************************************************/
 
 #include <int.h>
-#include "parser_aux.h"
+#include <parser_aux.h>
 #include <gstr.h>
-#include "structure.h"
-#include "element.h"
+#include <structure.h>
+#include <element.h>
 #include <limits.h>
+#include <intprops.h>
 
 static int
 _asn1_get_indefinite_length_string (const unsigned char *der, int *len);
@@ -61,8 +62,8 @@ _asn1_error_description_tag_error (asn1_node node, char 
*ErrorDescription)
 long
 asn1_get_length_der (const unsigned char *der, int der_len, int *len)
 {
-  unsigned int ans, sum, last;
-  int k, punt;
+  unsigned int ans;
+  int k, punt, sum;
 
   *len = 0;
   if (der_len <= 0)
@@ -84,12 +85,14 @@ asn1_get_length_der (const unsigned char *der, int der_len, 
int *len)
          ans = 0;
          while (punt <= k && punt < der_len)
            {
-             last = ans;
-
-             ans = (ans*256) + der[punt++];
-             if (ans < last)
-               /* we wrapped around, no bignum support... */
-               return -2;
+              if (INT_MULTIPLY_OVERFLOW (ans, 256))
+                return -2;
+              ans *= 256;
+
+              if (INT_ADD_OVERFLOW (ans, ((unsigned)der[punt])))
+                return -2;
+             ans += der[punt];
+              punt++;
            }
        }
       else
@@ -101,14 +104,12 @@ asn1_get_length_der (const unsigned char *der, int 
der_len, int *len)
       *len = punt;
     }
 
-  sum = ans + *len;
-
-  /* check for overflow as well INT_MAX as a maximum upper
-   * limit for length */
-  if (sum >= INT_MAX || sum < ans)
+  sum = ans;
+  if (ans >= INT_MAX || INT_ADD_OVERFLOW (sum, (*len)))
     return -2;
-
-  if (((int) sum) > der_len)
+  sum += *len;
+  
+  if (sum > (unsigned)der_len)
     return -4;
 
   return ans;
@@ -132,7 +133,6 @@ asn1_get_tag_der (const unsigned char *der, int der_len,
 {
   unsigned int ris;
   int punt;
-  unsigned int last;
 
   if (der == NULL || der_len < 2 || len == NULL)
     return ASN1_DER_ERROR;
@@ -151,25 +151,32 @@ asn1_get_tag_der (const unsigned char *der, int der_len,
       ris = 0;
       while (punt <= der_len && der[punt] & 128)
        {
-         last = ris;
 
-         ris = (ris * 128) + (der[punt++] & 0x7F);
-         if (ris < last)
-           /* wrapped around, and no bignums... */
-           return ASN1_DER_ERROR;
+          if (INT_MULTIPLY_OVERFLOW (ris, 128))
+            return ASN1_DER_ERROR;
+          ris *= 128;
+
+          if (INT_ADD_OVERFLOW (ris, ((unsigned)(der[punt] & 0x7F))))
+            return ASN1_DER_ERROR;
+          ris += (der[punt] & 0x7F);
+          punt++;
        }
 
       if (punt >= der_len)
        return ASN1_DER_ERROR;
 
-      last = ris;
-
-      ris = (ris * 128) + (der[punt++] & 0x7F);
-      if (ris < last)
-       return ASN1_DER_ERROR;
+      if (INT_MULTIPLY_OVERFLOW (ris, 128))
+        return ASN1_DER_ERROR;
+      ris *= 128;
 
+      if (INT_ADD_OVERFLOW (ris, ((unsigned)(der[punt] & 0x7F))))
+        return ASN1_DER_ERROR;
+      ris += (der[punt] & 0x7F);
+      punt++;
+  
       *len = punt;
     }
+
   if (tag)
     *tag = ris;
   return ASN1_SUCCESS;
@@ -283,6 +290,7 @@ _asn1_get_objectid_der (const unsigned char *der, int 
der_len, int *ret_len,
 
   if (str == NULL || der_len <= 0)
     return ASN1_GENERIC_ERROR;
+
   len = asn1_get_length_der (der, der_len, &len_len);
 
   if (len < 0 || len > der_len || len_len > der_len)
@@ -307,14 +315,12 @@ _asn1_get_objectid_der (const unsigned char *der, int 
der_len, int *ret_len,
       leading = 0;
 
       /* check for wrap around */
+      if (INT_LEFT_SHIFT_OVERFLOW(val, 7))
+        return ASN1_DER_ERROR;
+      
       val = val << 7;
       val |= der[len_len + k] & 0x7F;
 
-      if (val < prev_val)
-       return ASN1_DER_ERROR;
-
-      prev_val = val;
-
       if (!(der[len_len + k] & 0x80))
        {
          _asn1_str_cat (str, str_size, ".");
@@ -324,6 +330,10 @@ _asn1_get_objectid_der (const unsigned char *der, int 
der_len, int *ret_len,
          leading = 1;
        }
     }
+  
+  if (INT_ADD_OVERFLOW(len, len_len))
+    return ASN1_DER_ERROR;
+  
   *ret_len = len + len_len;
 
   return ASN1_SUCCESS;
diff --git a/lib/gllib/Makefile.am b/lib/gllib/Makefile.am
index 519e32e..4f77930 100644
--- a/lib/gllib/Makefile.am
+++ b/lib/gllib/Makefile.am
@@ -1,6 +1,6 @@
 ## DO NOT EDIT! GENERATED AUTOMATICALLY!
 ## Process this file with automake to produce Makefile.in.
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2013 Free Software Foundation, Inc.
 #
 # This file is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -21,7 +21,7 @@
 # the same distribution terms as the rest of that program.
 #
 # Generated by gnulib-tool.
-# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu 
--source-base=lib/gllib --m4-base=lib/glm4 --doc-base=doc --tests-base=tests 
--aux-dir=build-aux --lgpl=2 --no-conditional-dependencies --libtool 
--macro-prefix=lgl --no-vc-files hash-pjw-bare lib-symbol-versions 
lib-symbol-visibility stdint strverscmp
+# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu 
--source-base=lib/gllib --m4-base=lib/glm4 --doc-base=doc --tests-base=tests 
--aux-dir=build-aux --lgpl=2 --no-conditional-dependencies --libtool 
--macro-prefix=lgl --no-vc-files hash-pjw-bare intprops lib-symbol-versions 
lib-symbol-visibility stdint strverscmp
 
 AUTOMAKE_OPTIONS = 1.5 gnits
 
@@ -56,6 +56,13 @@ libgnu_la_SOURCES += hash-pjw-bare.h hash-pjw-bare.c
 
 ## end   gnulib module hash-pjw-bare
 
+## begin gnulib module intprops
+
+
+EXTRA_DIST += intprops.h
+
+## end   gnulib module intprops
+
 ## begin gnulib module lib-symbol-visibility
 
 # The value of $(CFLAG_VISIBILITY) needs to be added to the CFLAGS for the
diff --git a/lib/gllib/hash-pjw-bare.c b/lib/gllib/hash-pjw-bare.c
index 92101e3..0874676 100644
--- a/lib/gllib/hash-pjw-bare.c
+++ b/lib/gllib/hash-pjw-bare.c
@@ -1,6 +1,6 @@
 /* hash-pjw-bare.c -- compute a hash value from a provided buffer.
 
-   Copyright (C) 2012 Free Software Foundation, Inc.
+   Copyright (C) 2012-2013 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify it
    under the terms of the GNU Lesser General Public License as published
diff --git a/lib/gllib/hash-pjw-bare.h b/lib/gllib/hash-pjw-bare.h
index 60852d1..b98ff08 100644
--- a/lib/gllib/hash-pjw-bare.h
+++ b/lib/gllib/hash-pjw-bare.h
@@ -1,5 +1,5 @@
 /* hash-pjw-bare.h -- declaration for a simple hash function
-   Copyright (C) 2012 Free Software Foundation, Inc.
+   Copyright (C) 2012-2013 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify it
    under the terms of the GNU Lesser General Public License as published
diff --git a/lib/gllib/intprops.h b/lib/gllib/intprops.h
new file mode 100644
index 0000000..fbf4f08
--- /dev/null
+++ b/lib/gllib/intprops.h
@@ -0,0 +1,319 @@
+/* intprops.h -- properties of integer types
+
+   Copyright (C) 2001-2005, 2009-2013 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as published by
+   the Free Software Foundation; either version 2.1 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+/* Written by Paul Eggert.  */
+
+#ifndef _GL_INTPROPS_H
+#define _GL_INTPROPS_H
+
+#include <limits.h>
+
+/* Return an integer value, converted to the same type as the integer
+   expression E after integer type promotion.  V is the unconverted value.  */
+#define _GL_INT_CONVERT(e, v) (0 * (e) + (v))
+
+/* Act like _GL_INT_CONVERT (E, -V) but work around a bug in IRIX 6.5 cc; see
+   <http://lists.gnu.org/archive/html/bug-gnulib/2011-05/msg00406.html>.  */
+#define _GL_INT_NEGATE_CONVERT(e, v) (0 * (e) - (v))
+
+/* The extra casts in the following macros work around compiler bugs,
+   e.g., in Cray C 5.0.3.0.  */
+
+/* True if the arithmetic type T is an integer type.  bool counts as
+   an integer.  */
+#define TYPE_IS_INTEGER(t) ((t) 1.5 == 1)
+
+/* True if negative values of the signed integer type T use two's
+   complement, ones' complement, or signed magnitude representation,
+   respectively.  Much GNU code assumes two's complement, but some
+   people like to be portable to all possible C hosts.  */
+#define TYPE_TWOS_COMPLEMENT(t) ((t) ~ (t) 0 == (t) -1)
+#define TYPE_ONES_COMPLEMENT(t) ((t) ~ (t) 0 == 0)
+#define TYPE_SIGNED_MAGNITUDE(t) ((t) ~ (t) 0 < (t) -1)
+
+/* True if the signed integer expression E uses two's complement.  */
+#define _GL_INT_TWOS_COMPLEMENT(e) (~ _GL_INT_CONVERT (e, 0) == -1)
+
+/* True if the arithmetic type T is signed.  */
+#define TYPE_SIGNED(t) (! ((t) 0 < (t) -1))
+
+/* Return 1 if the integer expression E, after integer promotion, has
+   a signed type.  */
+#define _GL_INT_SIGNED(e) (_GL_INT_NEGATE_CONVERT (e, 1) < 0)
+
+
+/* Minimum and maximum values for integer types and expressions.  These
+   macros have undefined behavior if T is signed and has padding bits.
+   If this is a problem for you, please let us know how to fix it for
+   your host.  */
+
+/* The maximum and minimum values for the integer type T.  */
+#define TYPE_MINIMUM(t)                                                 \
+  ((t) (! TYPE_SIGNED (t)                                               \
+        ? (t) 0                                                         \
+        : TYPE_SIGNED_MAGNITUDE (t)                                     \
+        ? ~ (t) 0                                                       \
+        : ~ TYPE_MAXIMUM (t)))
+#define TYPE_MAXIMUM(t)                                                 \
+  ((t) (! TYPE_SIGNED (t)                                               \
+        ? (t) -1                                                        \
+        : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
+
+/* The maximum and minimum values for the type of the expression E,
+   after integer promotion.  E should not have side effects.  */
+#define _GL_INT_MINIMUM(e)                                              \
+  (_GL_INT_SIGNED (e)                                                   \
+   ? - _GL_INT_TWOS_COMPLEMENT (e) - _GL_SIGNED_INT_MAXIMUM (e)         \
+   : _GL_INT_CONVERT (e, 0))
+#define _GL_INT_MAXIMUM(e)                                              \
+  (_GL_INT_SIGNED (e)                                                   \
+   ? _GL_SIGNED_INT_MAXIMUM (e)                                         \
+   : _GL_INT_NEGATE_CONVERT (e, 1))
+#define _GL_SIGNED_INT_MAXIMUM(e)                                       \
+  (((_GL_INT_CONVERT (e, 1) << (sizeof ((e) + 0) * CHAR_BIT - 2)) - 1) * 2 + 1)
+
+
+/* Return 1 if the __typeof__ keyword works.  This could be done by
+   'configure', but for now it's easier to do it by hand.  */
+#if 2 <= __GNUC__ || 0x5110 <= __SUNPRO_C
+# define _GL_HAVE___TYPEOF__ 1
+#else
+# define _GL_HAVE___TYPEOF__ 0
+#endif
+
+/* Return 1 if the integer type or expression T might be signed.  Return 0
+   if it is definitely unsigned.  This macro does not evaluate its argument,
+   and expands to an integer constant expression.  */
+#if _GL_HAVE___TYPEOF__
+# define _GL_SIGNED_TYPE_OR_EXPR(t) TYPE_SIGNED (__typeof__ (t))
+#else
+# define _GL_SIGNED_TYPE_OR_EXPR(t) 1
+#endif
+
+/* Bound on length of the string representing an unsigned integer
+   value representable in B bits.  log10 (2.0) < 146/485.  The
+   smallest value of B where this bound is not tight is 2621.  */
+#define INT_BITS_STRLEN_BOUND(b) (((b) * 146 + 484) / 485)
+
+/* Bound on length of the string representing an integer type or expression T.
+   Subtract 1 for the sign bit if T is signed, and then add 1 more for
+   a minus sign if needed.
+
+   Because _GL_SIGNED_TYPE_OR_EXPR sometimes returns 0 when its argument is
+   signed, this macro may overestimate the true bound by one byte when
+   applied to unsigned types of size 2, 4, 16, ... bytes.  */
+#define INT_STRLEN_BOUND(t)                                     \
+  (INT_BITS_STRLEN_BOUND (sizeof (t) * CHAR_BIT                 \
+                          - _GL_SIGNED_TYPE_OR_EXPR (t))        \
+   + _GL_SIGNED_TYPE_OR_EXPR (t))
+
+/* Bound on buffer size needed to represent an integer type or expression T,
+   including the terminating null.  */
+#define INT_BUFSIZE_BOUND(t) (INT_STRLEN_BOUND (t) + 1)
+
+
+/* Range overflow checks.
+
+   The INT_<op>_RANGE_OVERFLOW macros return 1 if the corresponding C
+   operators might not yield numerically correct answers due to
+   arithmetic overflow.  They do not rely on undefined or
+   implementation-defined behavior.  Their implementations are simple
+   and straightforward, but they are a bit harder to use than the
+   INT_<op>_OVERFLOW macros described below.
+
+   Example usage:
+
+     long int i = ...;
+     long int j = ...;
+     if (INT_MULTIPLY_RANGE_OVERFLOW (i, j, LONG_MIN, LONG_MAX))
+       printf ("multiply would overflow");
+     else
+       printf ("product is %ld", i * j);
+
+   Restrictions on *_RANGE_OVERFLOW macros:
+
+   These macros do not check for all possible numerical problems or
+   undefined or unspecified behavior: they do not check for division
+   by zero, for bad shift counts, or for shifting negative numbers.
+
+   These macros may evaluate their arguments zero or multiple times,
+   so the arguments should not have side effects.  The arithmetic
+   arguments (including the MIN and MAX arguments) must be of the same
+   integer type after the usual arithmetic conversions, and the type
+   must have minimum value MIN and maximum MAX.  Unsigned types should
+   use a zero MIN of the proper type.
+
+   These macros are tuned for constant MIN and MAX.  For commutative
+   operations such as A + B, they are also tuned for constant B.  */
+
+/* Return 1 if A + B would overflow in [MIN,MAX] arithmetic.
+   See above for restrictions.  */
+#define INT_ADD_RANGE_OVERFLOW(a, b, min, max)          \
+  ((b) < 0                                              \
+   ? (a) < (min) - (b)                                  \
+   : (max) - (b) < (a))
+
+/* Return 1 if A - B would overflow in [MIN,MAX] arithmetic.
+   See above for restrictions.  */
+#define INT_SUBTRACT_RANGE_OVERFLOW(a, b, min, max)     \
+  ((b) < 0                                              \
+   ? (max) + (b) < (a)                                  \
+   : (a) < (min) + (b))
+
+/* Return 1 if - A would overflow in [MIN,MAX] arithmetic.
+   See above for restrictions.  */
+#define INT_NEGATE_RANGE_OVERFLOW(a, min, max)          \
+  ((min) < 0                                            \
+   ? (a) < - (max)                                      \
+   : 0 < (a))
+
+/* Return 1 if A * B would overflow in [MIN,MAX] arithmetic.
+   See above for restrictions.  Avoid && and || as they tickle
+   bugs in Sun C 5.11 2010/08/13 and other compilers; see
+   <http://lists.gnu.org/archive/html/bug-gnulib/2011-05/msg00401.html>.  */
+#define INT_MULTIPLY_RANGE_OVERFLOW(a, b, min, max)     \
+  ((b) < 0                                              \
+   ? ((a) < 0                                           \
+      ? (a) < (max) / (b)                               \
+      : (b) == -1                                       \
+      ? 0                                               \
+      : (min) / (b) < (a))                              \
+   : (b) == 0                                           \
+   ? 0                                                  \
+   : ((a) < 0                                           \
+      ? (a) < (min) / (b)                               \
+      : (max) / (b) < (a)))
+
+/* Return 1 if A / B would overflow in [MIN,MAX] arithmetic.
+   See above for restrictions.  Do not check for division by zero.  */
+#define INT_DIVIDE_RANGE_OVERFLOW(a, b, min, max)       \
+  ((min) < 0 && (b) == -1 && (a) < - (max))
+
+/* Return 1 if A % B would overflow in [MIN,MAX] arithmetic.
+   See above for restrictions.  Do not check for division by zero.
+   Mathematically, % should never overflow, but on x86-like hosts
+   INT_MIN % -1 traps, and the C standard permits this, so treat this
+   as an overflow too.  */
+#define INT_REMAINDER_RANGE_OVERFLOW(a, b, min, max)    \
+  INT_DIVIDE_RANGE_OVERFLOW (a, b, min, max)
+
+/* Return 1 if A << B would overflow in [MIN,MAX] arithmetic.
+   See above for restrictions.  Here, MIN and MAX are for A only, and B need
+   not be of the same type as the other arguments.  The C standard says that
+   behavior is undefined for shifts unless 0 <= B < wordwidth, and that when
+   A is negative then A << B has undefined behavior and A >> B has
+   implementation-defined behavior, but do not check these other
+   restrictions.  */
+#define INT_LEFT_SHIFT_RANGE_OVERFLOW(a, b, min, max)   \
+  ((a) < 0                                              \
+   ? (a) < (min) >> (b)                                 \
+   : (max) >> (b) < (a))
+
+
+/* The _GL*_OVERFLOW macros have the same restrictions as the
+   *_RANGE_OVERFLOW macros, except that they do not assume that operands
+   (e.g., A and B) have the same type as MIN and MAX.  Instead, they assume
+   that the result (e.g., A + B) has that type.  */
+#define _GL_ADD_OVERFLOW(a, b, min, max)                                \
+  ((min) < 0 ? INT_ADD_RANGE_OVERFLOW (a, b, min, max)                  \
+   : (a) < 0 ? (b) <= (a) + (b)                                         \
+   : (b) < 0 ? (a) <= (a) + (b)                                         \
+   : (a) + (b) < (b))
+#define _GL_SUBTRACT_OVERFLOW(a, b, min, max)                           \
+  ((min) < 0 ? INT_SUBTRACT_RANGE_OVERFLOW (a, b, min, max)             \
+   : (a) < 0 ? 1                                                        \
+   : (b) < 0 ? (a) - (b) <= (a)                                         \
+   : (a) < (b))
+#define _GL_MULTIPLY_OVERFLOW(a, b, min, max)                           \
+  (((min) == 0 && (((a) < 0 && 0 < (b)) || ((b) < 0 && 0 < (a))))       \
+   || INT_MULTIPLY_RANGE_OVERFLOW (a, b, min, max))
+#define _GL_DIVIDE_OVERFLOW(a, b, min, max)                             \
+  ((min) < 0 ? (b) == _GL_INT_NEGATE_CONVERT (min, 1) && (a) < - (max)  \
+   : (a) < 0 ? (b) <= (a) + (b) - 1                                     \
+   : (b) < 0 && (a) + (b) <= (a))
+#define _GL_REMAINDER_OVERFLOW(a, b, min, max)                          \
+  ((min) < 0 ? (b) == _GL_INT_NEGATE_CONVERT (min, 1) && (a) < - (max)  \
+   : (a) < 0 ? (a) % (b) != ((max) - (b) + 1) % (b)                     \
+   : (b) < 0 && ! _GL_UNSIGNED_NEG_MULTIPLE (a, b, max))
+
+/* Return a nonzero value if A is a mathematical multiple of B, where
+   A is unsigned, B is negative, and MAX is the maximum value of A's
+   type.  A's type must be the same as (A % B)'s type.  Normally (A %
+   -B == 0) suffices, but things get tricky if -B would overflow.  */
+#define _GL_UNSIGNED_NEG_MULTIPLE(a, b, max)                            \
+  (((b) < -_GL_SIGNED_INT_MAXIMUM (b)                                   \
+    ? (_GL_SIGNED_INT_MAXIMUM (b) == (max)                              \
+       ? (a)                                                            \
+       : (a) % (_GL_INT_CONVERT (a, _GL_SIGNED_INT_MAXIMUM (b)) + 1))   \
+    : (a) % - (b))                                                      \
+   == 0)
+
+
+/* Integer overflow checks.
+
+   The INT_<op>_OVERFLOW macros return 1 if the corresponding C operators
+   might not yield numerically correct answers due to arithmetic overflow.
+   They work correctly on all known practical hosts, and do not rely
+   on undefined behavior due to signed arithmetic overflow.
+
+   Example usage:
+
+     long int i = ...;
+     long int j = ...;
+     if (INT_MULTIPLY_OVERFLOW (i, j))
+       printf ("multiply would overflow");
+     else
+       printf ("product is %ld", i * j);
+
+   These macros do not check for all possible numerical problems or
+   undefined or unspecified behavior: they do not check for division
+   by zero, for bad shift counts, or for shifting negative numbers.
+
+   These macros may evaluate their arguments zero or multiple times, so the
+   arguments should not have side effects.
+
+   These macros are tuned for their last argument being a constant.
+
+   Return 1 if the integer expressions A * B, A - B, -A, A * B, A / B,
+   A % B, and A << B would overflow, respectively.  */
+
+#define INT_ADD_OVERFLOW(a, b) \
+  _GL_BINARY_OP_OVERFLOW (a, b, _GL_ADD_OVERFLOW)
+#define INT_SUBTRACT_OVERFLOW(a, b) \
+  _GL_BINARY_OP_OVERFLOW (a, b, _GL_SUBTRACT_OVERFLOW)
+#define INT_NEGATE_OVERFLOW(a) \
+  INT_NEGATE_RANGE_OVERFLOW (a, _GL_INT_MINIMUM (a), _GL_INT_MAXIMUM (a))
+#define INT_MULTIPLY_OVERFLOW(a, b) \
+  _GL_BINARY_OP_OVERFLOW (a, b, _GL_MULTIPLY_OVERFLOW)
+#define INT_DIVIDE_OVERFLOW(a, b) \
+  _GL_BINARY_OP_OVERFLOW (a, b, _GL_DIVIDE_OVERFLOW)
+#define INT_REMAINDER_OVERFLOW(a, b) \
+  _GL_BINARY_OP_OVERFLOW (a, b, _GL_REMAINDER_OVERFLOW)
+#define INT_LEFT_SHIFT_OVERFLOW(a, b) \
+  INT_LEFT_SHIFT_RANGE_OVERFLOW (a, b, \
+                                 _GL_INT_MINIMUM (a), _GL_INT_MAXIMUM (a))
+
+/* Return 1 if the expression A <op> B would overflow,
+   where OP_RESULT_OVERFLOW (A, B, MIN, MAX) does the actual test,
+   assuming MIN and MAX are the minimum and maximum for the result type.
+   Arguments should be free of side effects.  */
+#define _GL_BINARY_OP_OVERFLOW(a, b, op_result_overflow)        \
+  op_result_overflow (a, b,                                     \
+                      _GL_INT_MINIMUM (0 * (b) + (a)),          \
+                      _GL_INT_MAXIMUM (0 * (b) + (a)))
+
+#endif /* _GL_INTPROPS_H */
diff --git a/lib/gllib/stddef.in.h b/lib/gllib/stddef.in.h
index 9384cf6..51a308a 100644
--- a/lib/gllib/stddef.in.h
+++ b/lib/gllib/stddef.in.h
@@ -1,6 +1,6 @@
 /* A substitute for POSIX 2008 <stddef.h>, for platforms that have issues.
 
-   Copyright (C) 2009-2012 Free Software Foundation, Inc.
+   Copyright (C) 2009-2013 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as published by
diff --git a/lib/gllib/stdint.in.h b/lib/gllib/stdint.in.h
index 4f61f95..50170e7 100644
--- a/lib/gllib/stdint.in.h
+++ b/lib/gllib/stdint.in.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2002, 2004-2012 Free Software Foundation, Inc.
+/* Copyright (C) 2001-2002, 2004-2013 Free Software Foundation, Inc.
    Written by Paul Eggert, Bruno Haible, Sam Steingold, Peter Burwood.
    This file is part of gnulib.
 
diff --git a/lib/gllib/string.in.h b/lib/gllib/string.in.h
index ed187c9..ef25d3c 100644
--- a/lib/gllib/string.in.h
+++ b/lib/gllib/string.in.h
@@ -1,6 +1,6 @@
 /* A GNU-like <string.h>.
 
-   Copyright (C) 1995-1996, 2001-2012 Free Software Foundation, Inc.
+   Copyright (C) 1995-1996, 2001-2013 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as published by
diff --git a/lib/gllib/strverscmp.c b/lib/gllib/strverscmp.c
index 46f3ebc..2091567 100644
--- a/lib/gllib/strverscmp.c
+++ b/lib/gllib/strverscmp.c
@@ -1,5 +1,5 @@
 /* Compare strings while treating digits characters numerically.
-   Copyright (C) 1997, 2000, 2002, 2004, 2006, 2009-2012 Free Software
+   Copyright (C) 1997, 2000, 2002, 2004, 2006, 2009-2013 Free Software
    Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Jean-François Bignolles <address@hidden>, 1997.
diff --git a/lib/glm4/00gnulib.m4 b/lib/glm4/00gnulib.m4
index d978cb8..d4ad759 100644
--- a/lib/glm4/00gnulib.m4
+++ b/lib/glm4/00gnulib.m4
@@ -1,5 +1,5 @@
 # 00gnulib.m4 serial 2
-dnl Copyright (C) 2009-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2013 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/lib/glm4/extensions.m4 b/lib/glm4/extensions.m4
index 6d17d8a..617323b 100644
--- a/lib/glm4/extensions.m4
+++ b/lib/glm4/extensions.m4
@@ -1,7 +1,7 @@
 # serial 12  -*- Autoconf -*-
 # Enable extensions on systems that normally disable them.
 
-# Copyright (C) 2003, 2006-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2006-2013 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
diff --git a/lib/glm4/gnulib-cache.m4 b/lib/glm4/gnulib-cache.m4
index 1037f83..fab6a8a 100644
--- a/lib/glm4/gnulib-cache.m4
+++ b/lib/glm4/gnulib-cache.m4
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2013 Free Software Foundation, Inc.
 #
 # This file is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -27,12 +27,13 @@
 
 
 # Specification in the form of a command-line invocation:
-#   gnulib-tool --import --dir=. --lib=libgnu --source-base=lib/gllib 
--m4-base=lib/glm4 --doc-base=doc --tests-base=tests --aux-dir=build-aux 
--lgpl=2 --no-conditional-dependencies --libtool --macro-prefix=lgl 
--no-vc-files hash-pjw-bare lib-symbol-versions lib-symbol-visibility stdint 
strverscmp
+#   gnulib-tool --import --dir=. --lib=libgnu --source-base=lib/gllib 
--m4-base=lib/glm4 --doc-base=doc --tests-base=tests --aux-dir=build-aux 
--lgpl=2 --no-conditional-dependencies --libtool --macro-prefix=lgl 
--no-vc-files hash-pjw-bare intprops lib-symbol-versions lib-symbol-visibility 
stdint strverscmp
 
 # Specification in the form of a few gnulib-tool.m4 macro invocations:
 gl_LOCAL_DIR([])
 gl_MODULES([
   hash-pjw-bare
+  intprops
   lib-symbol-versions
   lib-symbol-visibility
   stdint
diff --git a/lib/glm4/gnulib-common.m4 b/lib/glm4/gnulib-common.m4
index 15d2b2b..0ae5a9e 100644
--- a/lib/glm4/gnulib-common.m4
+++ b/lib/glm4/gnulib-common.m4
@@ -1,5 +1,5 @@
 # gnulib-common.m4 serial 33
-dnl Copyright (C) 2007-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2013 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -294,6 +294,8 @@ Amsterdam
 # for interoperability with automake-1.9.6 from autoconf-2.62.
 # Remove this macro when we can assume autoconf >= 2.62 or
 # autoconf >= 2.60 && automake >= 1.10.
+# AC_AUTOCONF_VERSION was introduced in 2.62, so use that as the witness.
+m4_ifndef([AC_AUTOCONF_VERSION],[
 m4_ifdef([AC_PROG_MKDIR_P], [
   dnl For automake-1.9.6 && autoconf < 2.62: Ensure MKDIR_P is AC_SUBSTed.
   m4_define([AC_PROG_MKDIR_P],
@@ -304,13 +306,15 @@ m4_ifdef([AC_PROG_MKDIR_P], [
     [AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake
      MKDIR_P='$(mkdir_p)'
      AC_SUBST([MKDIR_P])])])
+])
 
 # AC_C_RESTRICT
 # This definition overrides the AC_C_RESTRICT macro from autoconf 2.60..2.61,
 # so that mixed use of GNU C and GNU C++ and mixed use of Sun C and Sun C++
 # works.
 # This definition can be removed once autoconf >= 2.62 can be assumed.
-m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.62]),[-1],[
+# AC_AUTOCONF_VERSION was introduced in 2.62, so use that as the witness.
+m4_ifndef([AC_AUTOCONF_VERSION],[
 AC_DEFUN([AC_C_RESTRICT],
 [AC_CACHE_CHECK([for C/C++ restrict keyword], [ac_cv_c_restrict],
   [ac_cv_c_restrict=no
diff --git a/lib/glm4/gnulib-comp.m4 b/lib/glm4/gnulib-comp.m4
index 6badef8..acc246e 100644
--- a/lib/glm4/gnulib-comp.m4
+++ b/lib/glm4/gnulib-comp.m4
@@ -1,5 +1,5 @@
 # DO NOT EDIT! GENERATED AUTOMATICALLY!
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2013 Free Software Foundation, Inc.
 #
 # This file is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -42,6 +42,7 @@ AC_DEFUN([lgl_EARLY],
   AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
   # Code from module hash-pjw-bare:
   # Code from module include_next:
+  # Code from module intprops:
   # Code from module lib-symbol-versions:
   # Code from module lib-symbol-visibility:
   # Code from module multiarch:
@@ -221,6 +222,7 @@ AC_DEFUN([lgl_FILE_LIST], [
   build-aux/snippet/warn-on-use.h
   lib/hash-pjw-bare.c
   lib/hash-pjw-bare.h
+  lib/intprops.h
   lib/stddef.in.h
   lib/stdint.in.h
   lib/string.in.h
diff --git a/lib/glm4/gnulib-tool.m4 b/lib/glm4/gnulib-tool.m4
index a09ffc1..f3dea1a 100644
--- a/lib/glm4/gnulib-tool.m4
+++ b/lib/glm4/gnulib-tool.m4
@@ -1,5 +1,5 @@
 # gnulib-tool.m4 serial 2
-dnl Copyright (C) 2004-2005, 2009-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2004-2005, 2009-2013 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/lib/glm4/include_next.m4 b/lib/glm4/include_next.m4
index a60a261..108d945 100644
--- a/lib/glm4/include_next.m4
+++ b/lib/glm4/include_next.m4
@@ -1,5 +1,5 @@
 # include_next.m4 serial 23
-dnl Copyright (C) 2006-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2006-2013 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/lib/glm4/ld-version-script.m4 b/lib/glm4/ld-version-script.m4
index 5ed93ef..63386f1 100644
--- a/lib/glm4/ld-version-script.m4
+++ b/lib/glm4/ld-version-script.m4
@@ -1,5 +1,5 @@
 # ld-version-script.m4 serial 3
-dnl Copyright (C) 2008-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2013 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/lib/glm4/longlong.m4 b/lib/glm4/longlong.m4
index b9c65c7..3af6ab5 100644
--- a/lib/glm4/longlong.m4
+++ b/lib/glm4/longlong.m4
@@ -1,5 +1,5 @@
 # longlong.m4 serial 17
-dnl Copyright (C) 1999-2007, 2009-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 1999-2007, 2009-2013 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/lib/glm4/multiarch.m4 b/lib/glm4/multiarch.m4
index 0c288b8..552ec7e 100644
--- a/lib/glm4/multiarch.m4
+++ b/lib/glm4/multiarch.m4
@@ -1,5 +1,5 @@
 # multiarch.m4 serial 7
-dnl Copyright (C) 2008-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2013 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/lib/glm4/stddef_h.m4 b/lib/glm4/stddef_h.m4
index cc11609..5da8ab1 100644
--- a/lib/glm4/stddef_h.m4
+++ b/lib/glm4/stddef_h.m4
@@ -1,6 +1,6 @@
 dnl A placeholder for POSIX 2008 <stddef.h>, for platforms that have issues.
 # stddef_h.m4 serial 4
-dnl Copyright (C) 2009-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2013 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/lib/glm4/stdint.m4 b/lib/glm4/stdint.m4
index 28d342e..27cdcdb 100644
--- a/lib/glm4/stdint.m4
+++ b/lib/glm4/stdint.m4
@@ -1,5 +1,5 @@
 # stdint.m4 serial 43
-dnl Copyright (C) 2001-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2001-2013 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/lib/glm4/string_h.m4 b/lib/glm4/string_h.m4
index 5677e09..cc5fbbb 100644
--- a/lib/glm4/string_h.m4
+++ b/lib/glm4/string_h.m4
@@ -1,6 +1,6 @@
 # Configure a GNU-like replacement for <string.h>.
 
-# Copyright (C) 2007-2012 Free Software Foundation, Inc.
+# Copyright (C) 2007-2013 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
diff --git a/lib/glm4/strverscmp.m4 b/lib/glm4/strverscmp.m4
index d744647..110daf2 100644
--- a/lib/glm4/strverscmp.m4
+++ b/lib/glm4/strverscmp.m4
@@ -1,5 +1,5 @@
 # strverscmp.m4 serial 8
-dnl Copyright (C) 2002, 2005-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2005-2013 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/lib/glm4/visibility.m4 b/lib/glm4/visibility.m4
index a7d4d8c..6cbd7e5 100644
--- a/lib/glm4/visibility.m4
+++ b/lib/glm4/visibility.m4
@@ -1,5 +1,5 @@
 # visibility.m4 serial 5 (gettext-0.18.2)
-dnl Copyright (C) 2005, 2008, 2010-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2005, 2008, 2010-2013 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/lib/glm4/warn-on-use.m4 b/lib/glm4/warn-on-use.m4
index a77802e..e43beeb 100644
--- a/lib/glm4/warn-on-use.m4
+++ b/lib/glm4/warn-on-use.m4
@@ -1,5 +1,5 @@
 # warn-on-use.m4 serial 5
-dnl Copyright (C) 2010-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2010-2013 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/lib/glm4/wchar_t.m4 b/lib/glm4/wchar_t.m4
index 534735d..e1e1e69 100644
--- a/lib/glm4/wchar_t.m4
+++ b/lib/glm4/wchar_t.m4
@@ -1,5 +1,5 @@
 # wchar_t.m4 serial 4 (gettext-0.18.2)
-dnl Copyright (C) 2002-2003, 2008-2012 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2003, 2008-2013 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/tests/Test_overflow.c b/tests/Test_overflow.c
index 6f81dc5..fc8466b 100644
--- a/tests/Test_overflow.c
+++ b/tests/Test_overflow.c
@@ -136,7 +136,7 @@ main (int argc, char** argv)
   /* Test that values larger than would fit in the input string are
      rejected.  This problem was fixed in libtasn1 2.12. */
     {
-      unsigned long num = 2147483647;
+      unsigned long num = 2147483649;
       unsigned char der[20];
       int der_len;
       long l;


hooks/post-receive
-- 
GNU libtasn1



reply via email to

[Prev in Thread] Current Thread [Next in Thread]