Compilation fix

This commit is contained in:
Nekotekina 2015-05-08 18:42:35 +03:00
parent f92c10ef71
commit 8cf62e560e
2 changed files with 27 additions and 2 deletions

2
asmjit

@ -1 +1 @@
Subproject commit 48da90ded775fa2ba0fd3f15522890ad631ad6de
Subproject commit 9001d2f2b77eec93ce79facb1ef6d11b96dc612f

View File

@ -477,6 +477,11 @@ s32 cellFsStReadStart(u32 fd, u64 offset, u64 size)
return CELL_FS_EBADF;
}
if (size > std::numeric_limits<u32>::max()) // ???
{
return CELL_FS_EINVAL;
}
switch (auto status = file->st_status.compare_and_swap(SSS_INITIALIZED, SSS_STARTED))
{
case SSS_NOT_INITIALIZED:
@ -590,6 +595,11 @@ s32 cellFsStRead(u32 fd, vm::ptr<u8> buf, u64 size, vm::ptr<u64> rsize)
return CELL_FS_EBADF;
}
if (size > std::numeric_limits<u32>::max()) // ???
{
return CELL_FS_EINVAL;
}
if (file->st_status.read_sync() == SSS_NOT_INITIALIZED || file->st_copyless)
{
return CELL_FS_ENXIO;
@ -657,6 +667,11 @@ s32 cellFsStReadPutCurrentAddr(u32 fd, vm::ptr<u8> addr, u64 size)
return CELL_FS_EBADF;
}
if (size > std::numeric_limits<u32>::max()) // ???
{
return CELL_FS_EINVAL;
}
if (file->st_status.read_sync() == SSS_NOT_INITIALIZED || !file->st_copyless)
{
return CELL_FS_ENXIO;
@ -684,6 +699,11 @@ s32 cellFsStReadWait(u32 fd, u64 size)
return CELL_FS_EBADF;
}
if (size > std::numeric_limits<u32>::max()) // ???
{
return CELL_FS_EINVAL;
}
if (file->st_status.read_sync() == SSS_NOT_INITIALIZED)
{
return CELL_FS_ENXIO;
@ -718,12 +738,17 @@ s32 cellFsStReadWaitCallback(u32 fd, u64 size, fs_st_cb_t func)
return CELL_FS_EBADF;
}
if (size > std::numeric_limits<u32>::max()) // ???
{
return CELL_FS_EINVAL;
}
if (file->st_status.read_sync() == SSS_NOT_INITIALIZED)
{
return CELL_FS_ENXIO;
}
if (!file->st_callback.compare_and_swap_test({}, { size, func }))
if (!file->st_callback.compare_and_swap_test({}, { static_cast<u32>(size), func }))
{
return CELL_FS_EIO;
}