[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[SCM] GNU libtasn1 branch, master, updated. libtasn1_2_12-2-ge7a2f75
From: |
Nikos Mavrogiannopoulos |
Subject: |
[SCM] GNU libtasn1 branch, master, updated. libtasn1_2_12-2-ge7a2f75 |
Date: |
Sat, 31 Mar 2012 20:08:45 +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=e7a2f753a91f9538d2d98df0bb3bdc11005bfc82
The branch, master has been updated
via e7a2f753a91f9538d2d98df0bb3bdc11005bfc82 (commit)
from 3873c6a49122e3f15901646e072938557acd3f8e (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 e7a2f753a91f9538d2d98df0bb3bdc11005bfc82
Author: Nikos Mavrogiannopoulos <address@hidden>
Date: Sat Mar 31 22:08:36 2012 +0200
Added additional test case
-----------------------------------------------------------------------
Summary of changes:
tests/Test_overflow.c | 28 ++++++++++++++++++++++++++--
1 files changed, 26 insertions(+), 2 deletions(-)
diff --git a/tests/Test_overflow.c b/tests/Test_overflow.c
index bd6ede7..cbf9381 100644
--- a/tests/Test_overflow.c
+++ b/tests/Test_overflow.c
@@ -99,6 +99,30 @@ main (void)
/* Test that values larger than would fit in the input string are
rejected. This problem was fixed in libtasn1 2.12. */
{
+ unsigned long num = 1073741824;
+ unsigned char der[20];
+ int der_len;
+ long l;
+ int len;
+
+ asn1_length_der (num, der, &der_len);
+
+ der_len = sizeof(der);
+ l = asn1_get_length_der (der, der_len, &len);
+
+ if (l == -4L)
+ puts ("OK: asn1_get_length_der overflow-large1");
+ else
+ {
+ printf ("ERROR: asn1_get_length_der overflow-large1 (l %ld len
%d)\n", l,
+ len);
+ return 1;
+ }
+ }
+
+ /* 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 char der[20];
int der_len;
@@ -111,10 +135,10 @@ main (void)
l = asn1_get_length_der (der, der_len, &len);
if (l == -2L)
- puts ("OK: asn1_get_length_der overflow-large");
+ puts ("OK: asn1_get_length_der overflow-large2");
else
{
- printf ("ERROR: asn1_get_length_der overflow-large (l %ld len %d)\n",
l,
+ printf ("ERROR: asn1_get_length_der overflow-large2 (l %ld len
%d)\n", l,
len);
return 1;
}
hooks/post-receive
--
GNU libtasn1
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [SCM] GNU libtasn1 branch, master, updated. libtasn1_2_12-2-ge7a2f75,
Nikos Mavrogiannopoulos <=