[File] [PATCH] MAME input recording: limit strings to maximum lengths

Christos Zoulas christos at zoulas.com
Sun Oct 6 17:06:05 UTC 2024


Fixed, thanks!

christos

> On Sep 16, 2024, at 11:18 PM, Mike Swanson <mikeonthecomputer at gmail.com> wrote:
> 
> Some driver names can fill up the full 12 bytes, and likewise MAME can
> (especially from Git builds) fill up the entire 32 bytes of space in
> the format header too.  Trying only to read until a null byte is not
> smart :-)
> ---
> magic/Magdir/games | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/magic/Magdir/games b/magic/Magdir/games
> index e32c5e6f..beff0e4a 100644
> --- a/magic/Magdir/games
> +++ b/magic/Magdir/games
> @@ -143,8 +143,8 @@
>> 8	leqdate	x			at %s,
>> 16	leshort	x			format version %d.
>> 18	leshort	x			\b%d,
> ->20	string	x			%s driver,
> ->32	string	x			%s
> +>20	string/12	x			%s driver,
> +>32	string/32	x			%s
> 
> # doom - submitted by Jon Dowland
> 
> -- 
> 2.46.1
> 
> -- 
> File mailing list
> File at astron.com
> https://mailman.astron.com/mailman/listinfo/file

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 235 bytes
Desc: Message signed with OpenPGP
URL: <https://mailman.astron.com/pipermail/file/attachments/20241006/7b975f73/attachment.asc>


More information about the File mailing list