mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-14 01:49:05 +00:00
[Core] Fix the null char in truncated value returned by switch_b64_decode
This commit is contained in:
@@ -26,7 +26,7 @@
|
||||
* Anthony Minessale II <anthm@freeswitch.org>
|
||||
* Juan Jose Comellas <juanjo@comellas.org>
|
||||
* Seven Du <dujinfang@gmail.com>
|
||||
*
|
||||
* Windy Wang <xiaofengcanyuexp@163.com>
|
||||
*
|
||||
* switch_utils.c -- Compatibility and Helper Code
|
||||
*
|
||||
@@ -1081,7 +1081,7 @@ SWITCH_DECLARE(switch_size_t) switch_b64_decode(const char *in, char *out, switc
|
||||
|
||||
while (l >= 8) {
|
||||
op[ol++] = (char) ((b >> (l -= 8)) % 256);
|
||||
if (ol >= olen - 2) {
|
||||
if (ol >= olen - 1) {
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user