aboutsummaryrefslogtreecommitdiffstats
path: root/util/fileutil.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2005-10-05 16:58:50 +0000
committerWerner Koch <[email protected]>2005-10-05 16:58:50 +0000
commitbd1df0119c26d14e298d11abdd07ae77e8fb124f (patch)
treeb536179161d11a20fd32df27971f65d952814a88 /util/fileutil.c
parent2005-10-02 Marcus Brinkmann <[email protected]> (diff)
downloadgnupg-bd1df0119c26d14e298d11abdd07ae77e8fb124f.tar.gz
gnupg-bd1df0119c26d14e298d11abdd07ae77e8fb124f.zip
Renamed g10.c to gpg.c
Filelength fixes for W32.
Diffstat (limited to '')
-rw-r--r--util/fileutil.c3
1 files changed, 2 insertions, 1 deletions
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;
}