From 362940cf89d413773f42268446e728c0f1199203 Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Mon, 16 Jun 2014 13:15:47 +0200 Subject: [PATCH] BMP sniffing: check more bytes * Check that the two high-order byte of the DIB header size are 0 (the largest known size according to wikipedia is 124 bytes). * This avoids identifying any text file that starts with "BM" as a BMP file. Fixes #10912. --- src/data/mime_db/image/bmp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/data/mime_db/image/bmp b/src/data/mime_db/image/bmp index d03c490e6f..8e5e881133 100644 --- a/src/data/mime_db/image/bmp +++ b/src/data/mime_db/image/bmp @@ -3,7 +3,7 @@ resource(0, "BEOS:TYPE") #'MIMS' "application/x-vnd.Be-meta-mime"; resource(1, "META:TYPE") "image/bmp"; -resource(2, "META:SNIFF_RULE") "0.50 (\"BM\")"; +resource(2, "META:SNIFF_RULE") "0.50 (\"BM\") [16](\"\\000\\000\")"; resource(3, "META:S:DESC") #'MSDC' "BMP image";