104-magic-remove-com.dpatch 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #!/bin/sh /usr/share/dpatch/dpatch-run
  2. ## 14-magic-remove-com.dpatch by Michael Piefel <piefel@debian.org>
  3. ##
  4. ## DP: Disable one-byte magic for COM (closes: #393775, #339618).
  5. @DPATCH@
  6. diff -Naur file-4.20.orig/magic/Magdir/msdos file-4.20/magic/Magdir/msdos
  7. --- file-4.20.orig/magic/Magdir/msdos 2007-01-19 19:35:20.000000000 +0000
  8. +++ file-4.20/magic/Magdir/msdos 2007-03-27 12:23:14.000000000 +0000
  9. @@ -262,8 +262,9 @@
  10. # Uncommenting only the first two lines will cover about 2/3 of COM files,
  11. # but it isn't feasible to match all COM files since there must be at least
  12. # two dozen different one-byte "magics".
  13. -0 byte 0xe9 DOS executable (COM)
  14. ->0x1FE leshort 0xAA55 \b, boot code
  15. +# Disabled one-byte magic (MPi)
  16. +#0 byte 0xe9 DOS executable (COM)
  17. +#>0x1FE leshort 0xAA55 \b, boot code
  18. >6 string SFX\ of\ LHarc (%s)
  19. 0 belong 0xffffffff DOS executable (device driver)
  20. #CMD640X2.SYS
  21. @@ -286,15 +287,16 @@
  22. >>77 string >\x40
  23. >>>77 string <\x5B
  24. >>>>77 string x \b, name: %.8s
  25. -0 byte 0x8c DOS executable (COM)
  26. +# Disabled one-byte magic (MPi)
  27. +#0 byte 0x8c DOS executable (COM)
  28. # 0xeb conflicts with "sequent" magic
  29. -0 byte 0xeb DOS executable (COM)
  30. ->0x1FE leshort 0xAA55 \b, boot code
  31. ->85 string UPX \b, UPX compressed
  32. ->4 string \ $ARX \b, ARX self-extracting archive
  33. ->4 string \ $LHarc \b, LHarc self-extracting archive
  34. ->0x20e string SFX\ by\ LARC \b, LARC self-extracting archive
  35. -0 byte 0xb8 COM executable
  36. +#0 byte 0xeb DOS executable (COM)
  37. +#>0x1FE leshort 0xAA55 \b, boot code
  38. +#>85 string UPX \b, UPX compressed
  39. +#>4 string \ $ARX \b, ARX self-extracting archive
  40. +#>4 string \ $LHarc \b, LHarc self-extracting archive
  41. +#>0x20e string SFX\ by\ LARC \b, LARC self-extracting archive
  42. +#0 byte 0xb8 COM executable
  43. # modified by Joerg Jenderek
  44. >1 lelong !0x21cd4cff for DOS
  45. # http://syslinux.zytor.com/comboot.php