CVE-2014-8117.5.5063ca3.patch 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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-05
  6. diff --git a/doc/file.man b/doc/file.man
  7. index b8f7e84..f6c91e7 100644
  8. --- a/doc/file.man
  9. +++ b/doc/file.man
  10. @@ -16,6 +16,7 @@
  11. .Op Fl F Ar separator
  12. .Op Fl f Ar namefile
  13. .Op Fl m Ar magicfiles
  14. +.Op Fl R Ar maxrecursion
  15. .Ar
  16. .Ek
  17. .Nm
  18. @@ -295,6 +296,11 @@ Don't translate unprintable characters to \eooo.
  19. Normally
  20. .Nm
  21. translates unprintable characters to their octal representation.
  22. +.It Fl R , Fl Fl recursion Ar maxlevel
  23. +Set the maximum recursion level for indirect type magic or name/use entry
  24. +invocations.
  25. +The default is
  26. +.Dv 15 .
  27. .It Fl s , Fl Fl special-files
  28. Normally,
  29. .Nm
  30. diff --git a/doc/libmagic.man b/doc/libmagic.man
  31. index 272b838..0a2ed9a 100644
  32. --- a/doc/libmagic.man
  33. +++ b/doc/libmagic.man
  34. @@ -37,7 +37,8 @@
  35. .Nm magic_setflags ,
  36. .Nm magic_check ,
  37. .Nm magic_compile ,
  38. -.Nm magic_load
  39. +.Nm magic_setparam ,
  40. +.Nm magic_getparam ,
  41. .Nd Magic number recognition library
  42. .Sh LIBRARY
  43. .Lb libmagic
  44. @@ -67,6 +68,10 @@
  45. .Fn magic_list "magic_t cookie" "const char *filename"
  46. .Ft int
  47. .Fn magic_load "magic_t cookie" "const char *filename"
  48. +.Ft int
  49. +.Fn magic_getparam "magic_t cookie" "int param" "void *value"
  50. +.Ft int
  51. +.Fn magic_setparam "magic_t cookie" "int param" "const void *value"
  52. .Sh DESCRIPTION
  53. These functions
  54. operate on the magic database file
  55. @@ -246,6 +251,21 @@ If that variable is not set, the default database file name is __MAGIC__.
  56. adds
  57. .Dq .mgc
  58. to the database filename as appropriate.
  59. +.Pp
  60. +The
  61. +.Fn magic_getparam
  62. +and
  63. +.Fn magic_setparam
  64. +allow getting and setting various limits related to the the magic
  65. +library.
  66. +.Bl -column "MAGIC_PARAM_MAX_RECURSION" "size_t" "Default" -offset indent
  67. +.It Sy "Parameter" Ta Sy "Type" Ta Sy "Default
  68. +.It Li MAGIC_PARAM_MAX_RECURSION Ta size_t Ta 15
  69. +.El
  70. +The
  71. +.Dv MAGIC_PARAM_MAX_RECURSION
  72. +parameter controls how many levels of recursion will be followed for
  73. +indirect magic entries or for name/use calls.
  74. .Sh RETURN VALUES
  75. The function
  76. .Fn magic_open