summaryrefslogtreecommitdiffstats
path: root/contrib/file/src/ascmagic.c
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2016-05-09 17:39:11 -0300
committerRenato Botelho <renato@netgate.com>2016-05-09 17:39:11 -0300
commiteb1aa95459d780e1328d821fd6af261c2221a62b (patch)
treed0c75db0de1902022252ffee3acbfe775366214c /contrib/file/src/ascmagic.c
parent4a578420216361b8acfb7296dd0b68c805e5121b (diff)
parent1708fafa25d9413ab466d3670d803e2ebf885d45 (diff)
downloadFreeBSD-src-eb1aa95459d780e1328d821fd6af261c2221a62b.zip
FreeBSD-src-eb1aa95459d780e1328d821fd6af261c2221a62b.tar.gz
Merge remote-tracking branch 'origin/stable/10' into devel
Diffstat (limited to 'contrib/file/src/ascmagic.c')
-rw-r--r--contrib/file/src/ascmagic.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/contrib/file/src/ascmagic.c b/contrib/file/src/ascmagic.c
index b9ab789..9e0f663 100644
--- a/contrib/file/src/ascmagic.c
+++ b/contrib/file/src/ascmagic.c
@@ -35,7 +35,7 @@
#include "file.h"
#ifndef lint
-FILE_RCSID("@(#)$File: ascmagic.c,v 1.94 2016/03/31 17:51:12 christos Exp $")
+FILE_RCSID("@(#)$File: ascmagic.c,v 1.92 2015/04/09 20:01:41 christos Exp $")
#endif /* lint */
#include "magic.h"
@@ -147,7 +147,7 @@ file_ascmagic_with_encoding(struct magic_set *ms, const unsigned char *buf,
== NULL)
goto done;
if ((rv = file_softmagic(ms, utf8_buf,
- (size_t)(utf8_end - utf8_buf), NULL, NULL,
+ (size_t)(utf8_end - utf8_buf), 0, NULL,
TEXTTEST, text)) == 0)
rv = -1;
}
@@ -183,10 +183,10 @@ file_ascmagic_with_encoding(struct magic_set *ms, const unsigned char *buf,
}
/* Beware, if the data has been truncated, the final CR could have
- been followed by a LF. If we have ms->bytes_max bytes, it indicates
+ been followed by a LF. If we have HOWMANY bytes, it indicates
that the data might have been truncated, probably even before
this function was called. */
- if (seen_cr && nbytes < ms->bytes_max)
+ if (seen_cr && nbytes < HOWMANY)
n_cr++;
if (strcmp(type, "binary") == 0) {
OpenPOWER on IntegriCloud