seafile
seafile copied to clipboard
Missing error check in base64 encoder
The function b64encode
of the source file utils_win.cpp
[does not check the return value] (https://github.com/haiwen/seadrive-gui/blob/8a1e459f1c42a24eec6fcce482398bebf6459e1c/src/utils/utils-win.cpp#L349) of CryptBinaryToString
. A possible reason for an error returned would be, if the length of input
is longer than 32 KiB.
Thus an error goes unnoticed in every function calling b64encode
.
The return value of CryptBinaryToString
should be checked and an error propagated to every calling function, which in turn needs to add a check.