Add readSize > halfBufferSize for sceAtracSetHalfwayBufferAndGetID

This commit is contained in:
raven02 2013-04-12 09:54:10 +08:00
parent 21fcf7b984
commit 746b866129

View File

@ -30,6 +30,7 @@
#define ATRAC_ERROR_API_FAIL 0x80630002
#define ATRAC_ERROR_ALL_DATA_DECODED 0x80630024
#define ATRAC_ERROR_SECOND_BUFFER_NOT_NEEDED 0x80630022
#define ATRAC_ERROR_INCORRECT_READ_SIZE 0x80630013
#define AT3_MAGIC 0x0270
#define AT3_PLUS_MAGIC 0xFFFE
@ -480,6 +481,8 @@ int sceAtracSetDataAndGetID(u32 buffer, u32 bufferSize)
int sceAtracSetHalfwayBufferAndGetID(u32 halfBuffer, u32 readSize, u32 halfBufferSize)
{
ERROR_LOG(HLE, "UNIMPL sceAtracSetHalfwayBufferAndGetID(%08x, %08x, %08x)", halfBuffer, readSize, halfBufferSize);
if (readSize > halfBufferSize)
return ATRAC_ERROR_INCORRECT_READ_SIZE;
int codecType = getCodecType(halfBuffer);
Atrac *atrac = new Atrac();