aboutsummaryrefslogtreecommitdiffstats
path: root/g10/plaintext.c
diff options
context:
space:
mode:
authorDavid Shaw <[email protected]>2004-02-22 04:16:31 +0000
committerDavid Shaw <[email protected]>2004-02-22 04:16:31 +0000
commitd8590475fe1a01941a673e49396a26339b65fccd (patch)
tree539d005f77f204b0651edee2dbf3c8ea34885b5d /g10/plaintext.c
parent* keyserver.c (keyserver_spawn): Use the full 64-bit keyid in the INFO (diff)
downloadgnupg-d8590475fe1a01941a673e49396a26339b65fccd.tar.gz
gnupg-d8590475fe1a01941a673e49396a26339b65fccd.zip
* plaintext.c (handle_plaintext): Properly handle a --max-output of zero
(do not limit output at all).
Diffstat (limited to 'g10/plaintext.c')
-rw-r--r--g10/plaintext.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/g10/plaintext.c b/g10/plaintext.c
index e057d3fae..a998acbb2 100644
--- a/g10/plaintext.c
+++ b/g10/plaintext.c
@@ -168,7 +168,7 @@ handle_plaintext( PKT_plaintext *pt, md_filter_context_t *mfx,
#endif
if( fp )
{
- if((count++)>opt.max_output)
+ if(opt.max_output && (count++)>opt.max_output)
{
log_error("Error writing to `%s': %s\n",
fname,"exceeded --max-output limit\n");
@@ -201,7 +201,7 @@ handle_plaintext( PKT_plaintext *pt, md_filter_context_t *mfx,
md_write( mfx->md, buffer, len );
if( fp )
{
- if((count+=len)>opt.max_output)
+ if(opt.max_output && (count+=len)>opt.max_output)
{
log_error("Error writing to `%s': %s\n",
fname,"exceeded --max-output limit\n");
@@ -234,7 +234,7 @@ handle_plaintext( PKT_plaintext *pt, md_filter_context_t *mfx,
#endif
if( fp )
{
- if((count++)>opt.max_output)
+ if(opt.max_output && (count++)>opt.max_output)
{
log_error("Error writing to `%s': %s\n",
fname,"exceeded --max-output limit\n");
@@ -270,7 +270,7 @@ handle_plaintext( PKT_plaintext *pt, md_filter_context_t *mfx,
md_write( mfx->md, buffer, len );
if( fp )
{
- if((count+=len)>opt.max_output)
+ if(opt.max_output && (count+=len)>opt.max_output)
{
log_error("Error writing to `%s': %s\n",
fname,"exceeded --max-output limit\n");
@@ -297,7 +297,7 @@ handle_plaintext( PKT_plaintext *pt, md_filter_context_t *mfx,
while( (c = iobuf_get(pt->buf)) != -1 ) {
if( fp )
{
- if((count++)>opt.max_output)
+ if(opt.max_output && (count++)>opt.max_output)
{
log_error("Error writing to `%s': %s\n",
fname,"exceeded --max-output limit\n");