mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-14 21:56:41 +01:00
9d5aad10de
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
20 lines
588 B
Diff
20 lines
588 B
Diff
--- a/pjlib-util/src/pjlib-util/base64.c 2017-05-03 10:29:07.200417026 -0400
|
|
+++ b/pjlib-util/src/pjlib-util/base64.c 2017-05-03 10:28:30.344335390 -0400
|
|
@@ -131,7 +131,7 @@
|
|
|
|
PJ_ASSERT_RETURN(input && out && out_len, PJ_EINVAL);
|
|
|
|
- while (buf[len-1] == '=' && len)
|
|
+ while (len && buf[len-1] == '=')
|
|
--len;
|
|
|
|
PJ_ASSERT_RETURN(*out_len >= PJ_BASE64_TO_BASE256_LEN(len),
|
|
@@ -161,7 +161,7 @@
|
|
out[j++] = (pj_uint8_t)(((c[2] & 0x03)<<6) | (c[3] & 0x3F));
|
|
}
|
|
|
|
- pj_assert(j < *out_len);
|
|
+ pj_assert(j <= *out_len);
|
|
*out_len = j;
|
|
|
|
return PJ_SUCCESS;
|