CVE-2014-8117.5.5063ca3.patch 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. Subject: Document changes
  2. Upstream-Author: Christos Zoulas <christos@zoulas.com>
  3. Date: Thu Nov 27 16:15:06 2014 +0000
  4. Origin: FILE5_20-35-g5063ca3
  5. Last-Update: 2015-01-09
  6. --- a/doc/file.man
  7. +++ b/doc/file.man
  8. @@ -16,6 +16,7 @@
  9. .Op Fl F Ar separator
  10. .Op Fl f Ar namefile
  11. .Op Fl m Ar magicfiles
  12. +.Op Fl R Ar maxrecursion
  13. .Ar
  14. .Ek -words
  15. .Nm
  16. @@ -278,6 +279,11 @@
  17. Normally
  18. .Nm
  19. translates unprintable characters to their octal representation.
  20. +.It Fl R , Fl Fl recursion Ar maxlevel
  21. +Set the maximum recursion level for indirect type magic or name/use entry
  22. +invocations.
  23. +The default is
  24. +.Dv 15 .
  25. .It Fl s , -special-files
  26. Normally,
  27. .Nm
  28. --- a/doc/libmagic.man
  29. +++ b/doc/libmagic.man
  30. @@ -38,6 +38,8 @@
  31. .Nm magic_check ,
  32. .Nm magic_compile ,
  33. .Nm magic_load
  34. +.Nm magic_setparam ,
  35. +.Nm magic_getparam ,
  36. .Nd Magic number recognition library.
  37. .Sh LIBRARY
  38. .Lb libmagic
  39. @@ -62,7 +64,9 @@
  40. .Ft int
  41. .Fn magic_compile "magic_t cookie, const char *filename"
  42. .Ft int
  43. -.Fn magic_load "magic_t cookie, const char *filename"
  44. +.Fn magic_getparam "magic_t cookie" "int param" "void *value"
  45. +.Ft int
  46. +.Fn magic_setparam "magic_t cookie" "int param" "const void *value"
  47. .Sh DESCRIPTION
  48. These functions
  49. operate on the magic database file
  50. @@ -204,6 +208,21 @@
  51. adds
  52. .Dq .mgc
  53. to the database filename as appropriate.
  54. +.Pp
  55. +The
  56. +.Fn magic_getparam
  57. +and
  58. +.Fn magic_setparam
  59. +allow getting and setting various limits related to the the magic
  60. +library.
  61. +.Bl -column "MAGIC_PARAM_MAX_RECURSION" "size_t" "Default" -offset indent
  62. +.It Sy "Parameter" Ta Sy "Type" Ta Sy "Default
  63. +.It Li MAGIC_PARAM_MAX_RECURSION Ta size_t Ta 15
  64. +.El
  65. +The
  66. +.Dv MAGIC_PARAM_MAX_RECURSION
  67. +parameter controls how many levels of recursion will be followed for
  68. +indirect magic entries or for name/use calls.
  69. .Sh RETURN VALUES
  70. The function
  71. .Fn magic_open