ssl: fix output byte buffer size issue (#12372)
This commit is contained in:
parent
462ba1b360
commit
85b1e17df6
|
@ -240,7 +240,7 @@ private:
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
Result ReadImpl(std::vector<u8>* out_data, size_t size) {
|
Result ReadImpl(std::vector<u8>* out_data) {
|
||||||
ASSERT_OR_EXECUTE(did_handshake, { return ResultInternalError; });
|
ASSERT_OR_EXECUTE(did_handshake, { return ResultInternalError; });
|
||||||
size_t actual_size{};
|
size_t actual_size{};
|
||||||
Result res = backend->Read(&actual_size, *out_data);
|
Result res = backend->Read(&actual_size, *out_data);
|
||||||
|
@ -326,8 +326,8 @@ private:
|
||||||
}
|
}
|
||||||
|
|
||||||
void Read(HLERequestContext& ctx) {
|
void Read(HLERequestContext& ctx) {
|
||||||
std::vector<u8> output_bytes;
|
std::vector<u8> output_bytes(ctx.GetWriteBufferSize());
|
||||||
const Result res = ReadImpl(&output_bytes, ctx.GetWriteBufferSize());
|
const Result res = ReadImpl(&output_bytes);
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(res);
|
rb.Push(res);
|
||||||
if (res == ResultSuccess) {
|
if (res == ResultSuccess) {
|
||||||
|
|
Reference in New Issue