summaryrefslogtreecommitdiff
path: root/extra/yassl/taocrypt/src/integer.cpp
diff options
context:
space:
mode:
authorJoerg Bruehe <joerg.bruehe@oracle.com>2012-03-02 13:12:07 +0100
committerJoerg Bruehe <joerg.bruehe@oracle.com>2012-03-02 13:12:07 +0100
commit5b49c7ce916be1bbf306d2fd9175ed2b5ddeeed9 (patch)
treeeaf4c3c8c72a1ea9e3c78b234b3d717b87b0051b /extra/yassl/taocrypt/src/integer.cpp
parentc3b04553c475f5780fb3371c6a7492fc203d2dbd (diff)
downloadmariadb-git-5b49c7ce916be1bbf306d2fd9175ed2b5ddeeed9.tar.gz
Further upgrade the yaSSL library to version 2.2.0
to pick up some new security fixes that are in it. Patch provided by Georgi Kodinov.
Diffstat (limited to 'extra/yassl/taocrypt/src/integer.cpp')
-rw-r--r--extra/yassl/taocrypt/src/integer.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/extra/yassl/taocrypt/src/integer.cpp b/extra/yassl/taocrypt/src/integer.cpp
index 2d55f48e91f..bfced6d0c74 100644
--- a/extra/yassl/taocrypt/src/integer.cpp
+++ b/extra/yassl/taocrypt/src/integer.cpp
@@ -1,5 +1,5 @@
/*
- Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -2587,11 +2587,14 @@ void Integer::Decode(Source& source)
}
word32 length = GetLength(source);
+ if (length == 0 || source.GetError().What()) return;
if ( (b = source.next()) == 0x00)
length--;
else
source.prev();
+
+ if (source.IsLeft(length) == false) return;
unsigned int words = (length + WORD_SIZE - 1) / WORD_SIZE;
words = RoundupSize(words);