summaryrefslogtreecommitdiffstats
path: root/contrib/file/src/ascmagic.c
diff options
context:
space:
mode:
authordelphij <delphij@FreeBSD.org>2016-04-18 07:36:24 +0000
committerdelphij <delphij@FreeBSD.org>2016-04-18 07:36:24 +0000
commit1852c3675cd08e58d07e956f9023f5b3eee5ca3c (patch)
tree7811b5b9831ebf5066c7eae2d213b5e48f66deb7 /contrib/file/src/ascmagic.c
parentcb410646fdaa9c6e3285e1d015ad0095ba9b012b (diff)
parent3c98cb6b19e2270fd5235eb16a8ae98de4fb0b5f (diff)
downloadFreeBSD-src-1852c3675cd08e58d07e956f9023f5b3eee5ca3c.zip
FreeBSD-src-1852c3675cd08e58d07e956f9023f5b3eee5ca3c.tar.gz
MFV r298178:
Update file to 5.26. MFC after: 2 weeks Relnotes: yes
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 9e0f663..b9ab789 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.92 2015/04/09 20:01:41 christos Exp $")
+FILE_RCSID("@(#)$File: ascmagic.c,v 1.94 2016/03/31 17:51:12 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), 0, NULL,
+ (size_t)(utf8_end - utf8_buf), NULL, 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 HOWMANY bytes, it indicates
+ been followed by a LF. If we have ms->bytes_max bytes, it indicates
that the data might have been truncated, probably even before
this function was called. */
- if (seen_cr && nbytes < HOWMANY)
+ if (seen_cr && nbytes < ms->bytes_max)
n_cr++;
if (strcmp(type, "binary") == 0) {
OpenPOWER on IntegriCloud