View Issue Details

IDProjectCategoryView StatusLast Update
0000675fileGeneralpublic2025-07-09 17:38
Reportergabriel-vasile Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status newResolutionopen 
Summary0000675: apk_or_jar checks just the length of filename, not the filename itself
DescriptionThe bug was introduced in https://bugs.astron.com/view.php?id=658

As is: apk_or_jar runs if the zip entry is 20 or 9 bytes long
To be: apk_or_jar runs if the zip entry length and content is correct
TagsNo tags attached.

Activities

gabriel-vasile

2025-07-09 17:38

reporter  

jar.patch (612 bytes)   
diff --git a/magic/Magdir/archive b/magic/Magdir/archive
index 5d0b8a25..73c60741 100644
--- a/magic/Magdir/archive
+++ b/magic/Magdir/archive
@@ -1885,11 +1885,11 @@
 # Starts with META-INF/MANIFEST.MF (file name length = 20)
 >26	uleshort	20
 >>30	string	META-INF/MANIFEST.MF
->>0	use		apk_or_jar
+>>>0	use		apk_or_jar
 # Starts with META-INF/ folder (file name length = 9)
 >26	uleshort	9
 >>30	string	META-INF/
->>0	use		apk_or_jar
+>>>0	use		apk_or_jar
 
 # Starts with zipflinger virtual entry (28 + 104 = 132 bytes)
 # See https://github.com/obfusk/apksigcopier/blob/666f5b7/apksigcopier/__init__.py#L230
jar.patch (612 bytes)   

Issue History

Date Modified Username Field Change
2025-07-09 17:38 gabriel-vasile New Issue
2025-07-09 17:38 gabriel-vasile File Added: jar.patch