Commit Graph

21 Commits (63a3b8412753c78414ef28a8f0d3cdb6670dfcee)

Author SHA1 Message Date
Eric Leblond 63a3b84127 util-magic: fix build when magic is not available
If HAVE_MAGIC is not defined then we don't have the test functions
so we can't register them.
9 years ago
Victor Julien 810e43f373 magic: make optional
Make libmagic optional. If installed it will be enabled by default in
configure. Use --disable-libmagic to disable.
9 years ago
Victor Julien 471b61a0e1 magic: fix broken tests after CentOS6 update 9 years ago
Victor Julien 2aac437927 output: reduce verbosity on info level 10 years ago
Jason Ish 796dd5223b tests: no longer necessary to provide successful return code
1 pass, 0 is fail.
10 years ago
Victor Julien a1a0acf8a8 magic: make data arg const 10 years ago
Andreas Herz 15c98c6085 file-magic: improve libmagic handling on *nix systems 10 years ago
Victor Julien 20b9849999 util-magic: make unittests less specific
So they pass on CentOS 5.11 as well.
11 years ago
Victor Julien 6de34489b3 magic: disable tests depending on magic version
Some tests depend on specific results by specific magic versions.
Disable these.
11 years ago
Victor Julien 5e1f1ee4ff Fix filemagic unittests on OS_DARWIN 12 years ago
Eric Leblond 79fcf1378a Use unlikely in malloc failure test.
This patch is a result of applying the following coccinelle
transformation to suricata sources:

  @istested@
  identifier x;
  statement S1;
  identifier func =~ "(SCMalloc|SCStrdup|SCCalloc|SCMallocAligned|SCRealloc)";
  @@

  x = func(...)
  ... when != x
  - if (x == NULL) S1
  + if (unlikely(x == NULL)) S1
12 years ago
Ken Steele a2b502a30c Formatting change for function call.
Put open brace { for function on a new line to match coding standard.

Changed:

int foo(int x) {
}

to:

int foo(int x)
{
}
12 years ago
Anoop Saldanha 429b5cec10 Fix magic unittets.
Fix segv, when magic_load() fails due to the non-availability of default
magic files.
13 years ago
Eric Leblond e690b3bbc9 magic: freebsd magic return differently
FreeBSD don't return "Microsoft Office Document" but
"OLE 2 Compound Document". This patch takes this into account.
13 years ago
Victor Julien fd6df00684 Bug 585: use per detect thread libmagic ctx 13 years ago
Victor Julien ea6fcb355b magic: add test showing payload resulting in libmagic invalid read as reported by valgrind. 13 years ago
Eric Leblond 710d237724 Add missing sctrdup test 13 years ago
Victor Julien 2179ac2595 Minor fixes for coverity issues. 14 years ago
Victor Julien cdba2f50d1 Various fixes and improvements based on feedback by Coverity analyzer. 14 years ago
Victor Julien b402d97179 File carving -- enable reponse file extraction
- Enable response body tracking
- Enable file extraction for responses
- File store meta file includes magic, close reason.
- Option to force magic lookup for all stored files.
- Fix libmagic calls thead safety.
14 years ago
Victor Julien f4a6f4b293 Add libmagic detection, linking and a basic API. 14 years ago