summaryrefslogtreecommitdiff
path: root/buffer.c
diff options
context:
space:
mode:
authormouring <mouring>2001-04-05 23:36:01 +0000
committermouring <mouring>2001-04-05 23:36:01 +0000
commite4a86ba3e4061de2e9fafb327e7e7748d2337de0 (patch)
treec2632fea009aa1c8be8068084f040ae9dcc5508d /buffer.c
parent608d1eacb435c657c2b0bbb016bed1a7f96e7bf6 (diff)
downloadopenssh-e4a86ba3e4061de2e9fafb327e7e7748d2337de0.tar.gz
- markus@cvs.openbsd.org 2001/04/05 21:02:46
[buffer.c] better error message
Diffstat (limited to 'buffer.c')
-rw-r--r--buffer.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/buffer.c b/buffer.c
index 0a8a4aa3..68696fd3 100644
--- a/buffer.c
+++ b/buffer.c
@@ -12,7 +12,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: buffer.c,v 1.10 2001/01/21 19:05:45 markus Exp $");
+RCSID("$OpenBSD: buffer.c,v 1.11 2001/04/05 21:02:46 markus Exp $");
#include "xmalloc.h"
#include "buffer.h"
@@ -112,7 +112,8 @@ void
buffer_get(Buffer *buffer, char *buf, u_int len)
{
if (len > buffer->end - buffer->offset)
- fatal("buffer_get: trying to get more bytes than in buffer");
+ fatal("buffer_get: trying to get more bytes %d than in buffer %d",
+ len, buffer->end - buffer->offset);
memcpy(buf, buffer->buf + buffer->offset, len);
buffer->offset += len;
}