From 81af70971ba18b8ce86215b04180f1e3d21cdfc9 Mon Sep 17 00:00:00 2001 From: Rinnegatamante Date: Mon, 5 Sep 2022 07:42:54 +0200 Subject: [PATCH] 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. --- package_installer.c | 2 +- sqlite3.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package_installer.c b/package_installer.c index c07de09..20cf50a 100644 --- a/package_installer.c +++ b/package_installer.c @@ -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 diff --git a/sqlite3.c b/sqlite3.c index 7f3bf21..5c77912 100644 --- a/sqlite3.c +++ b/sqlite3.c @@ -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;