shithub: riscv

Download patch

ref: 80fdafd1d6bc27d7a94fabc12f4af37285a17338
parent: 0ba08200707e5d761cbe39d6b08174f8eb868125
author: Alex Musolino <alex@musolino.id.au>
date: Sun Apr 5 19:26:52 EDT 2020

file: try ismp4() before ismp3()

It is possible to find the mp3 sync word near the start of an mp4
file.  As such, file(1) could incorrectly identify some mp4s as mp3s.

--- a/sys/src/cmd/file.c
+++ b/sys/src/cmd/file.c
@@ -201,8 +201,8 @@
 	isicocur,		/* windows icon or cursor file */
 	isface,		/* ascii face file */
 	istga,
-	ismp3,
 	ismp4,
+	ismp3,
 
 	/* last resorts */
 	ismung,		/* entropy compressed/encrypted */