Compare commits

..
2 changed files with 13 additions and 3 deletions

No files matched your search

+5 -2
View File
@@ -187,8 +187,11 @@ export const dexStaticValueSchema = z.discriminatedUnion("type", [
type: z.literal("long"),
value: z
.string()
.regex(/^(?:0|-?[1-9]\d*)$/u)
.refine((text) => BigInt(text) >= LONG_MIN && BigInt(text) <= LONG_MAX),
.regex(/^(?:0|-?[1-9]\d*)$/u, { abort: true })
.refine((text) => {
const value = BigInt(text);
return value >= LONG_MIN && value <= LONG_MAX;
}),
}),
floating("float", Math.fround),
floating("double", (value) => value),
+8 -1
View File
@@ -536,6 +536,7 @@ it("reports DEX static values of static final fields without a static initialize
it.each([
{ type: "long", value: -9223372036854775808 },
{ type: "long", value: "1.5" },
{ type: "int", value: "1024" },
{ type: "double", value: 0.5 },
{ type: "enum", value: "fixture.Mode.ON" },
@@ -553,7 +554,13 @@ it.each([
dex_static_value,
},
]),
).rejects.toThrow("JADX class summary failed or was malformed");
).rejects.toMatchObject({
_tag: "AnalysisOutputError",
operation: "inspect_android_class",
message: expect.stringContaining(
"JADX class summary failed or was malformed",
),
});
},
);