From d63f218352622b74e8a323a9177e612c947ce848 Mon Sep 17 00:00:00 2001 From: Christos Zoulas Date: Wed, 25 Jul 2018 06:23:22 +0000 Subject: [PATCH] PR/11: Mention that magic_file and magic_buffer can produce different results. --- doc/libmagic.man | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/doc/libmagic.man b/doc/libmagic.man index 4c7e42ff..829e3657 100644 --- a/doc/libmagic.man +++ b/doc/libmagic.man @@ -1,6 +1,6 @@ -.\" $File: libmagic.man,v 1.41 2017/05/23 21:54:07 christos Exp $ +.\" $File: libmagic.man,v 1.42 2018/07/25 06:23:22 christos Exp $ .\" -.\" Copyright (c) Christos Zoulas 2003. +.\" Copyright (c) Christos Zoulas 2003, 2018. .\" All Rights Reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd May 23, 2017 +.Dd July 25, 2018 .Dt LIBMAGIC 3 .Os .Sh NAME @@ -391,6 +391,19 @@ The compiled default magic database. .Sh SEE ALSO .Xr file __CSECTION__ , .Xr magic __FSECTION__ +.Sh BUGS +The results from +.Fn magic_buffer +and +.Fn magic_file +where the buffer and the file contain the same data +can produce different results, because in the +.Fn magic_file +case, the program can +.Xr lseek 2 +and +.Xr stat 2 +the file descriptor. .Sh AUTHORS .An M\(oans Rullg\(oard Initial libmagic implementation, and configuration. -- 2.40.0