Merge pull request #1013 from hardening/cryptoFixes

Fixed skip_length() methods
This commit is contained in:
Marc-André Moreau 2013-02-26 15:14:38 -08:00
commit 7d99f0c24c
2 changed files with 3 additions and 3 deletions

View File

@ -76,7 +76,7 @@ int ber_write_length(STREAM* s, int length)
int _ber_skip_length(int length)
{
if (length > 0x7F)
if (length > 0x80)
return 3;
else
return 1;

View File

@ -25,9 +25,9 @@
int _der_skip_length(int length)
{
if (length > 0x7F && length <= 0xFF)
if (length > 0x81 && length <= 0x102)
return 2;
else if (length > 0xFF)
else if (length > 0x102)
return 3;
else
return 1;