104-magic-remove-com.dpatch 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #!/bin/sh /usr/share/dpatch/dpatch-run
  2. ## 104-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-04-03 12:32:00.000000000 +0000
  9. @@ -262,8 +262,8 @@
  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. +#0 byte 0xe9 DOS executable (COM)
  16. +#>0x1FE leshort 0xAA55 \b, boot code
  17. >6 string SFX\ of\ LHarc (%s)
  18. 0 belong 0xffffffff DOS executable (device driver)
  19. #CMD640X2.SYS
  20. @@ -286,15 +286,15 @@
  21. >>77 string >\x40
  22. >>>77 string <\x5B
  23. >>>>77 string x \b, name: %.8s
  24. -0 byte 0x8c DOS executable (COM)
  25. +#0 byte 0x8c DOS executable (COM)
  26. # 0xeb conflicts with "sequent" magic
  27. -0 byte 0xeb DOS executable (COM)
  28. ->0x1FE leshort 0xAA55 \b, boot code
  29. ->85 string UPX \b, UPX compressed
  30. ->4 string \ $ARX \b, ARX self-extracting archive
  31. ->4 string \ $LHarc \b, LHarc self-extracting archive
  32. ->0x20e string SFX\ by\ LARC \b, LARC self-extracting archive
  33. -0 byte 0xb8 COM executable
  34. +#0 byte 0xeb DOS executable (COM)
  35. +#>0x1FE leshort 0xAA55 \b, boot code
  36. +#>85 string UPX \b, UPX compressed
  37. +#>4 string \ $ARX \b, ARX self-extracting archive
  38. +#>4 string \ $LHarc \b, LHarc self-extracting archive
  39. +#>0x20e string SFX\ by\ LARC \b, LARC self-extracting archive
  40. +#0 byte 0xb8 COM executable
  41. # modified by Joerg Jenderek
  42. >1 lelong !0x21cd4cff for DOS
  43. # http://syslinux.zytor.com/comboot.php