diff options
| author | Marcus Brinkmann <[email protected]> | 2004-06-08 17:48:37 +0000 | 
|---|---|---|
| committer | Marcus Brinkmann <[email protected]> | 2004-06-08 17:48:37 +0000 | 
| commit | 50caa77ee5098dd6d3f7410f610a756bb5dac72f (patch) | |
| tree | 886bb5979d080c775de2354121a4346e8cb386b1 | |
| parent | 2004-06-08 Marcus Brinkmann <[email protected]> (diff) | |
| download | gpgme-50caa77ee5098dd6d3f7410f610a756bb5dac72f.tar.gz gpgme-50caa77ee5098dd6d3f7410f610a756bb5dac72f.zip | |
2004-06-08  Marcus Brinkmann  <[email protected]>
	* assuan-buffer.c (assuan_write_line): If the line is longer than
	the maximum line length, bail out early.
| -rw-r--r-- | assuan/ChangeLog | 5 | ||||
| -rw-r--r-- | assuan/assuan-buffer.c | 3 | 
2 files changed, 8 insertions, 0 deletions
| diff --git a/assuan/ChangeLog b/assuan/ChangeLog index 53547439..92d4b3ab 100644 --- a/assuan/ChangeLog +++ b/assuan/ChangeLog @@ -1,3 +1,8 @@ +2004-06-08  Marcus Brinkmann  <[email protected]> + +	* assuan-buffer.c (assuan_write_line): If the line is longer than +	the maximum line length, bail out early. +  2004-04-19  Werner Koch  <[email protected]>  	* assuan-socket-connect.c: Include sys/types.h diff --git a/assuan/assuan-buffer.c b/assuan/assuan-buffer.c index 59518f25..01e77001 100644 --- a/assuan/assuan-buffer.c +++ b/assuan/assuan-buffer.c @@ -238,6 +238,9 @@ assuan_write_line (ASSUAN_CONTEXT ctx, const char *line)    s = strchr (line, '\n');    len = s? (s-line) : strlen (line); +  if (len > LINELENGTH - 2) +    return ASSUAN_Line_Too_Long; +    /* fixme: we should do some kind of line buffering.  */    if (ctx->log_fp)      { | 
