From bd1df0119c26d14e298d11abdd07ae77e8fb124f Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Wed, 5 Oct 2005 16:58:50 +0000 Subject: Renamed g10.c to gpg.c Filelength fixes for W32. --- util/fileutil.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'util/fileutil.c') diff --git a/util/fileutil.c b/util/fileutil.c index c956b4fec..5834e3d89 100644 --- a/util/fileutil.c +++ b/util/fileutil.c @@ -253,6 +253,7 @@ is_file_compressed( const char *s, int *ret_rc ) IOBUF a; byte buf[4]; int i, rc = 0; + int overflow; struct magic_compress_s { size_t len; @@ -272,7 +273,7 @@ is_file_compressed( const char *s, int *ret_rc ) return 0; } - if ( iobuf_get_filelength( a ) < 4 ) { + if ( iobuf_get_filelength( a, &overflow ) < 4 && !overflow) { *ret_rc = 0; goto leave; } -- cgit