mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-13 09:36:46 +00:00
Fix bug with libzrtp zrtp_signaling_hash_set()
The function would silently not accept the imported zrtp-hash-value with "buffer too small" in the debug output. Modified-by: Travis Cross <tc@traviscross.com> Signed-off-by: Travis Cross <tc@traviscross.com>
This commit is contained in:
committed by
Travis Cross
parent
f311f81b8d
commit
7503d8aafa
@@ -113,7 +113,7 @@ const char* hex2str(const char* bin, int bin_size, char* buff, int buff_size)
|
||||
if (NULL == buff) {
|
||||
return "buffer is NULL";
|
||||
}
|
||||
if (buff_size < bin_size*2+1) {
|
||||
if (buff_size < bin_size*2) {
|
||||
return "buffer too small";
|
||||
}
|
||||
|
||||
@@ -121,7 +121,8 @@ const char* hex2str(const char* bin, int bin_size, char* buff, int buff_size)
|
||||
nptr = hex2char(nptr, *bin++);
|
||||
}
|
||||
|
||||
*nptr = 0;
|
||||
if (buff_size >= bin_size*2+1)
|
||||
*nptr = 0;
|
||||
|
||||
return buff;
|
||||
}
|
||||
|
Reference in New Issue
Block a user