From 20b984999999fa48822fef9763efe492dd6b4de8 Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Wed, 25 Feb 2015 07:37:54 +0100 Subject: [PATCH] util-magic: make unittests less specific So they pass on CentOS 5.11 as well. --- src/util-magic.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/util-magic.c b/src/util-magic.c index 8b077d31c0..fa05c6d90e 100644 --- a/src/util-magic.c +++ b/src/util-magic.c @@ -398,8 +398,8 @@ int MagicDetectTest04(void) } result = (char *)magic_buffer(magic_ctx, (void *)buffer, buffer_len); - if (result == NULL || strcmp(result, "OpenOffice.org 1.x Database file") != 0) { - printf("result %p:%s, not \"OpenOffice.org 1.x Database file\": ", result,result?result:"(null)"); + if (result == NULL || strncmp(result, "OpenOffice.org 1.x", 18) != 0) { + printf("result %p:%s, not \"OpenOffice.org 1.x\": ", result,result?result:"(null)"); goto end; } @@ -566,8 +566,8 @@ int MagicDetectTest08(void) } result = MagicGlobalLookup(buffer, buffer_len); - if (result == NULL || strcmp(result, "OpenOffice.org 1.x Database file") != 0) { - printf("result %p:%s, not \"OpenOffice.org 1.x Database file\": ", result,result?result:"(null)"); + if (result == NULL || strncmp(result, "OpenOffice.org 1.x", 18) != 0) { + printf("result %p:%s, not \"OpenOffice.org 1.x\": ", result,result?result:"(null)"); goto end; }