From: Marcus Brinkmann Date: Tue, 8 Jun 2004 17:48:37 +0000 (+0000) Subject: 2004-06-08 Marcus Brinkmann X-Git-Tag: gpgme-1.2.0@1385~419 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=164490e4129cd56f6e3f54bb64970047092efe9f;p=gpgme.git 2004-06-08 Marcus Brinkmann * assuan-buffer.c (assuan_write_line): If the line is longer than the maximum line length, bail out early. --- diff --git a/trunk/assuan/ChangeLog b/trunk/assuan/ChangeLog index 5354743..92d4b3a 100644 --- a/trunk/assuan/ChangeLog +++ b/trunk/assuan/ChangeLog @@ -1,3 +1,8 @@ +2004-06-08 Marcus Brinkmann + + * assuan-buffer.c (assuan_write_line): If the line is longer than + the maximum line length, bail out early. + 2004-04-19 Werner Koch * assuan-socket-connect.c: Include sys/types.h diff --git a/trunk/assuan/assuan-buffer.c b/trunk/assuan/assuan-buffer.c index 59518f2..01e7700 100644 --- a/trunk/assuan/assuan-buffer.c +++ b/trunk/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) {