Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f80efdf7 authored by Kenny Root's avatar Kenny Root
Browse files

Adjust SQLiteDatabase/Program buffer sizes

Some error messages would have clobbered some memory adjacent to them,
so increase the buffer sizes to fit them.

Change-Id: I9c4a3f3444bf57b5d2bd1b7a2546e16137747ad0
parent c948cc8c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -470,7 +470,7 @@ void throw_sqlite3_exception_errcode(JNIEnv* env, int errcode, const char* messa
    if (errcode == SQLITE_DONE) {
        throw_sqlite3_exception(env, errcode, NULL, message);
    } else {
        char temp[20];
        char temp[21];
        sprintf(temp, "error code %d", errcode);
        throw_sqlite3_exception(env, errcode, temp, message);
    }
+4 −4
Original line number Diff line number Diff line
@@ -45,8 +45,8 @@ static jfieldID gStatementField;

static void native_compile(JNIEnv* env, jobject object, jstring sqlString)
{
    char buf[32];
    sprintf(buf, "android_database_SQLiteProgram->native_compile() not implemented");
    char buf[65];
    strcpy(buf, "android_database_SQLiteProgram->native_compile() not implemented");
    throw_sqlite3_exception(env, GET_HANDLE(env, object), buf);
    return;
}
@@ -152,8 +152,8 @@ static void native_clear_bindings(JNIEnv* env, jobject object)

static void native_finalize(JNIEnv* env, jobject object)
{
    char buf[32];
    sprintf(buf, "android_database_SQLiteProgram->native_finalize() not implemented");
    char buf[66];
    strcpy(buf, "android_database_SQLiteProgram->native_finalize() not implemented");
    throw_sqlite3_exception(env, GET_HANDLE(env, object), buf);
    return;
}