2004-06-08 Marcus Brinkmann <marcus@g10code.de>

* assuan-buffer.c (assuan_write_line): If the line is longer than
	the maximum line length, bail out early.
This commit is contained in:
Marcus Brinkmann 2004-06-08 17:48:37 +00:00
parent 99011b0b8d
commit 50caa77ee5
2 changed files with 8 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2004-06-08 Marcus Brinkmann <marcus@g10code.de>
* assuan-buffer.c (assuan_write_line): If the line is longer than
the maximum line length, bail out early.
2004-04-19 Werner Koch <wk@gnupg.org>
* assuan-socket-connect.c: Include sys/types.h

View File

@ -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)
{