summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2001-04-06 01:36:01 +0200
committerBen Lindstrom <mouring@eviladmin.org>2001-04-06 01:36:01 +0200
commitd7dd23ffed2b54d5443ef9c0d09324a56894c739 (patch)
tree815ceff894f6c20a455bbe03e37d962307265326
parent - markus@cvs.openbsd.org 2001/04/05 20:01:10 (diff)
downloadopenssh-d7dd23ffed2b54d5443ef9c0d09324a56894c739.tar.xz
openssh-d7dd23ffed2b54d5443ef9c0d09324a56894c739.zip
- markus@cvs.openbsd.org 2001/04/05 21:02:46
[buffer.c] better error message
-rw-r--r--ChangeLog5
-rw-r--r--buffer.c5
2 files changed, 7 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 09086a951..96a780e82 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -29,6 +29,9 @@
- markus@cvs.openbsd.org 2001/04/05 20:01:10
[clientloop.c]
for ~R print message if server does not support rekeying. (and fix ~R).
+ - markus@cvs.openbsd.org 2001/04/05 21:02:46
+ [buffer.c]
+ better error message
20010405
- OpenBSD CVS Sync
@@ -4901,4 +4904,4 @@
- Wrote replacements for strlcpy and mkdtemp
- Released 1.0pre1
-$Id: ChangeLog,v 1.1071 2001/04/05 23:34:29 mouring Exp $
+$Id: ChangeLog,v 1.1072 2001/04/05 23:36:01 mouring Exp $
diff --git a/buffer.c b/buffer.c
index 0a8a4aa35..68696fd3f 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;
}