1
0
Fork 0
forked from fte/fteqw

Fix underflow bug in Base64_EncodeBlock

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5673 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2020-04-19 05:13:51 +00:00
parent 843f971e2c
commit 9c348a4bc8

View file

@ -6066,6 +6066,8 @@ size_t Base64_EncodeBlock(const qbyte *in, size_t length, char *out, size_t outs
if (out < end) *out++ = (length>=3)?Base64_Encode((v>>0)&63):'='; if (out < end) *out++ = (length>=3)?Base64_Encode((v>>0)&63):'=';
in+=3; in+=3;
if (length <= 3)
break;
length -= 3; length -= 3;
} }
end++; end++;