Check for malformed TitleID with lowercase letters and fix build on latest vitasdk. (#624)

* Fix compilation on latest vitasdk.

* Check for malformed TitleID with lowercase letters.
This commit is contained in:
Rinnegatamante 2022-09-05 07:42:54 +02:00 committed by GitHub
parent a7a9d5d9d2
commit 81af70971b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -243,7 +243,7 @@ int makeHeadBin() {
getSfoString(sfo_buffer, "TITLE_ID", titleid, sizeof(titleid));
// Enforce TITLE_ID format
if (strlen(titleid) != 9)
if ((strlen(titleid) != 9) || (strncmp(titleid, strupr(titleid), 9) != 0))
return VITASHELL_ERROR_INVALID_TITLEID;
// Get content id

View File

@ -71,7 +71,7 @@ static int vita_xWrite(sqlite3_file *file, const void *buf, int count, sqlite_in
static int vita_xSync(sqlite3_file *file, int flags)
{
vfs_file *p = (vfs_file*)file;
int r = sceIoSyncByFd(*p->fd);
int r = sceIoSyncByFd(*p->fd, 0);
LOG("xSync %x, %x => %x\n", *p->fd, flags, r);
if (IS_ERROR(r))
return SQLITE_IOERR_FSYNC;