This repository was archived by the owner on Jul 27, 2024. It is now read-only.
Commit 31ee0f9
committed
const_string_encryption: Fix problem where static constructor not correctly found
The current code expects that static constructors are declared as:
.method static constructor <clinit>()V
However, static constructors in smali files may contain the "public" keyword
so the static constructor has the form:
.method public static constructor <clinit>()V
The current code doesn't find such constructors and inserts another
static constructor to the code instead so there are 2 static constructors.
Smali seems to use only the first declared constructor (with the string
initializers) and ignores the second one with the original initialization
code which leads to uninitialized static members.
This patch simply relaxes the check of static constructors so there
can be an arbitrary string (including empty string) between ".method"
and "static".1 parent 8637197 commit 31ee0f9
1 file changed
Lines changed: 1 addition & 1 deletion
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
113 | | - | |
| 113 | + | |
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
| |||
0 commit comments