Skip to content

Commit 71a8b6c

Browse files
committed
Limit regex search for BEGIN to the first 4K of the file.
1 parent 74cafd7 commit 71a8b6c

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Diff for: magic/Magdir/commands

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
#------------------------------------------------------------------------------
3-
# $File: commands,v 1.48 2014/03/04 12:20:42 kim Exp $
3+
# $File: commands,v 1.49 2014/05/28 19:52:36 christos Exp $
44
# commands: file(1) magic for various shells and interpreters
55
#
66
#0 string/w : shell archive or script for antique kernel text
@@ -56,8 +56,7 @@
5656
!:mime text/x-awk
5757
0 string/wt #!\ /usr/bin/awk awk script text executable
5858
!:mime text/x-awk
59-
0 search/16384 BEGIN
60-
>0 regex =^\\s{0,100}BEGIN\\s{0,100}[{] awk script text
59+
0 regex/4096 =^\\s{0,100}BEGIN\\s{0,100}[{] awk script text
6160

6261
# AT&T Bell Labs' Plan 9 shell
6362
0 string/wt #!\ /bin/rc Plan 9 rc shell script text executable

0 commit comments

Comments
 (0)