diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2013-11-21 09:02:17 +0100 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2013-11-25 10:14:56 +0100 |
commit | eb440016e28ef46729536ae0d8c3a935eb3ca798 (patch) | |
tree | 33ae06dd439d000813af65bc812bcf00937ae4c9 /tests | |
parent | c5a9cfaf1bc008a2b4b7bbd544a8f3ab3d62d953 (diff) | |
download | libtasn1-eb440016e28ef46729536ae0d8c3a935eb3ca798.tar.gz libtasn1-eb440016e28ef46729536ae0d8c3a935eb3ca798.tar.bz2 libtasn1-eb440016e28ef46729536ae0d8c3a935eb3ca798.zip |
The parser accepts negative numbers in INTEGER ranges. Use snprintf() instead of strcpy() in parser.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Test_parser.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/Test_parser.c b/tests/Test_parser.c index c988cba..a93d954 100644 --- a/tests/Test_parser.c +++ b/tests/Test_parser.c @@ -72,6 +72,7 @@ test_type test_array[] = { ASN1_IDENTIFIER_NOT_FOUND, _FILE_ ":: identifier 'pkix' not found"}, /* Test INTEGER */ + {14, "int1 INTEGER (-5..5),", ASN1_SUCCESS, ""}, {14, "int1 INTEGER OPTIONAL,", ASN1_SUCCESS, ""}, {14, "int1 INTEGER DEFAULT 1,", ASN1_SUCCESS, ""}, {14, "int1 INTEGER DEFAULT -1,", ASN1_SUCCESS, ""}, @@ -80,8 +81,7 @@ test_type test_array[] = { {14, "int1 [1] EXPLICIT INTEGER,", ASN1_SUCCESS, ""}, {14, "int1 [1] IMPLICIT INTEGER,", ASN1_SUCCESS, ""}, {12, "Integer ::= [1] EXPLICIT INTEGER {v1(-1), v2(1)}", ASN1_SUCCESS, ""}, - {12, "Integer ::= INTEGER {v1(0), v2}", - ASN1_SYNTAX_ERROR, + {12, "Integer ::= INTEGER {v1(0), v2}", ASN1_SYNTAX_ERROR, _FILE_ ":12: Error: syntax error, unexpected '}', expecting '(' near '}'"}, {12, "Integer ::= INTEGER {v1(0), 1}", ASN1_SYNTAX_ERROR, |