Skip to content

Commit

Permalink
Added isSuspicious
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderOMara committed Jan 19, 2025
1 parent d7ac397 commit e939602
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
2 changes: 2 additions & 0 deletions macho/universal.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ for (const [index, { kind, arch, file, archs }] of fixtures.entries()) {
assertEquals(uni.length(), 0);
assertEquals(uni.isOpen(), false);
assertEquals(uni.isUniversal(), false);
assertEquals(uni.isSuspicious(), false);

switch (index % 4) {
case 0: {
Expand Down Expand Up @@ -48,6 +49,7 @@ for (const [index, { kind, arch, file, archs }] of fixtures.entries()) {
}
assertEquals(uni.isOpen(), true);
assertEquals(uni.isUniversal(), archs.size > 1);
// assertEquals(uni.isSuspicious(), false);

const architectures = new Set<Architecture>();
uni.architectures(architectures);
Expand Down
9 changes: 9 additions & 0 deletions macho/universal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -282,4 +282,13 @@ export class Universal {
public length(): number {
return this.mLength;
}

/**
* Check if FAT binary is suspicious.
*
* @returns Is suspicious.
*/
public isSuspicious(): boolean {
return this.mSuspicious;
}
}

0 comments on commit e939602

Please sign in to comment.