From 97da7f9691d88f3f2edaf92bc22b319cd45505ce Mon Sep 17 00:00:00 2001 From: LoveSy Date: Thu, 20 Jan 2022 01:31:05 +0800 Subject: [PATCH] Do not trust format of 3rd party json --- .../java/com/topjohnwu/magisk/core/model/module/LocalModule.kt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/main/java/com/topjohnwu/magisk/core/model/module/LocalModule.kt b/app/src/main/java/com/topjohnwu/magisk/core/model/module/LocalModule.kt index f9b0a02a0..d1c7df947 100644 --- a/app/src/main/java/com/topjohnwu/magisk/core/model/module/LocalModule.kt +++ b/app/src/main/java/com/topjohnwu/magisk/core/model/module/LocalModule.kt @@ -1,5 +1,6 @@ package com.topjohnwu.magisk.core.model.module +import com.squareup.moshi.JsonDataException import com.topjohnwu.magisk.core.Const import com.topjohnwu.magisk.di.ServiceLocator import com.topjohnwu.superuser.Shell @@ -121,6 +122,8 @@ data class LocalModule( } } catch (e: IOException) { Timber.w(e) + } catch (e: JsonDataException) { + Timber.w(e) } return false }