diff options
author | Liong Sauw Ming <ming@teluu.com> | 2015-12-30 04:00:39 +0000 |
---|---|---|
committer | Liong Sauw Ming <ming@teluu.com> | 2015-12-30 04:00:39 +0000 |
commit | 9f7ea5c68a39a2fcd8e744c0d294a635aadcd702 (patch) | |
tree | b2bb8a0268c55a0789108fa22a676bc6c3a062ae | |
parent | 31ea915c22313a2a2006886b31f0fc2078daa0ee (diff) |
Re #1882 (misc): Fixed string truncation length checking in srtp (note that this is a third party source).
Thanks to Dusan Klinec for the patch.
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@5222 74dad513-b988-da41-8d7b-12977e46ad98
-rw-r--r-- | third_party/srtp/crypto/math/datatypes.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/third_party/srtp/crypto/math/datatypes.c b/third_party/srtp/crypto/math/datatypes.c index 4707522f..73451d71 100644 --- a/third_party/srtp/crypto/math/datatypes.c +++ b/third_party/srtp/crypto/math/datatypes.c @@ -113,7 +113,7 @@ octet_string_hex_string(const void *s, int length) { length *= 2; /* truncate string if it would be too long */ - if (length > MAX_PRINT_STRING_LEN) + if (length >= MAX_PRINT_STRING_LEN) length = MAX_PRINT_STRING_LEN-1; for (i=0; i < length; i+=2) { |