View Issue Details

IDProjectCategoryView StatusLast Update
0000299file[All Projects] Generalpublic2021-11-13 17:48
ReporteradepasqualeAssigned Tochristos 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version5.41 
Target VersionFixed in VersionHEAD 
Summary0000299: Separate magic for uuencode and xxencode
DescriptionCurrent file 5.41 doesn't distinguish between uuencode and xxencode.

I have updated the magic files based on existing comments, see attached patch.

Note that some archivers (e.g. https://wiki.powerarchiver.com/en:help:main:tools:uuencode_xxencode_mime_base64_yenc) do not have the "begin " keyword at zero, so I had to use a regex/1024.
Tagsmagic

Activities

adepasquale

2021-11-12 08:24

reporter  

uuencode.patch (1,276 bytes)
diff --git a/magic/Magdir/uuencode b/magic/Magdir/uuencode
index 78444684..d4c7d3b1 100644
--- a/magic/Magdir/uuencode
+++ b/magic/Magdir/uuencode
@@ -4,13 +4,13 @@
 # uuencode:  file(1) magic for ASCII-encoded files
 #
 
-# GRR:  the first line of xxencoded files is identical to that in uuencoded
-# files, but the first character in most subsequent lines is 'h' instead of
-# 'M'.  (xxencoding uses lowercase letters in place of most of uuencode's
-# punctuation and survives BITNET gateways better.)  If regular expressions
-# were supported, this entry could possibly be split into two with
-# "begin\040\.\*\012M" or "begin\040\.\*\012h" (where \. and \* are REs).
-0	search/1	begin\ 		uuencoded or xxencoded text
+# The first line of xxencoded files is identical to that in uuencoded files,
+# but the first character in most subsequent lines is 'h' instead of 'M'.
+0		regex/1024	\^begin\040[0-7]{3}\040
+>&0		regex/256	[\012\015]+M[\040-\140]{60}[\012\015]+				uuencoded text
+>&0		regex/256	[\012\015]+h[0-9A-Za-z\053\055]{60}[\012\015]+		xxencoded text
+>&0		default		x													uuencoded or xxencoded text
+>&0		string		>\0													\b, file name "%s"
 
 # btoa(1) is an alternative to uuencode that requires less space.
 0	search/1	xbtoa\ Begin	btoa'd text
uuencode.patch (1,276 bytes)

christos

2021-11-13 17:48

manager   ~0003668

Applied, thanks!

Issue History

Date Modified Username Field Change
2021-11-12 08:24 adepasquale New Issue
2021-11-12 08:24 adepasquale File Added: uuencode.patch
2021-11-12 08:24 adepasquale Tag Attached: magic
2021-11-13 17:48 christos Assigned To => christos
2021-11-13 17:48 christos Status new => assigned
2021-11-13 17:48 christos Status assigned => resolved
2021-11-13 17:48 christos Resolution open => fixed
2021-11-13 17:48 christos Fixed in Version => HEAD
2021-11-13 17:48 christos Note Added: 0003668