$NetBSD: patch-aa,v 1.1 2004/04/29 17:20:44 taca Exp $ --- MMagic.pm.orig 2004-03-15 17:23:04.000000000 +0900 +++ MMagic.pm @@ -985,6 +985,8 @@ sub magicMatchStr { else { #numeric + return if (length($str) < 4); + # read up to 4 bytes $data = substr($str, 0, 4);