From 9f7ea5c68a39a2fcd8e744c0d294a635aadcd702 Mon Sep 17 00:00:00 2001 From: Liong Sauw Ming Date: Wed, 30 Dec 2015 04:00:39 +0000 Subject: 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 --- third_party/srtp/crypto/math/datatypes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) { -- cgit v1.2.3