summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--bufaux.c8
2 files changed, 10 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 46e5a98ab..5091d4a75 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
120100416 120100416
2 - (djm) Release openssh-5.5p1 2 - (djm) Release openssh-5.5p1
3 - OpenBSD CVS Sync
4 - djm@cvs.openbsd.org 2010/03/26 03:13:17
5 [bufaux.c]
6 allow buffer_get_int_ret/buffer_get_int64_ret to take a NULL pointer
7 argument to allow skipping past values in a buffer
3 8
420100410 920100410
5 - (dtucker) [configure.ac] Put the check for the existence of getaddrinfo 10 - (dtucker) [configure.ac] Put the check for the existence of getaddrinfo
diff --git a/bufaux.c b/bufaux.c
index 4ef19c454..854fd510a 100644
--- a/bufaux.c
+++ b/bufaux.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bufaux.c,v 1.48 2010/02/02 22:49:34 djm Exp $ */ 1/* $OpenBSD: bufaux.c,v 1.49 2010/03/26 03:13:17 djm Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -84,7 +84,8 @@ buffer_get_int_ret(u_int *ret, Buffer *buffer)
84 84
85 if (buffer_get_ret(buffer, (char *) buf, 4) == -1) 85 if (buffer_get_ret(buffer, (char *) buf, 4) == -1)
86 return (-1); 86 return (-1);
87 *ret = get_u32(buf); 87 if (ret != NULL)
88 *ret = get_u32(buf);
88 return (0); 89 return (0);
89} 90}
90 91
@@ -106,7 +107,8 @@ buffer_get_int64_ret(u_int64_t *ret, Buffer *buffer)
106 107
107 if (buffer_get_ret(buffer, (char *) buf, 8) == -1) 108 if (buffer_get_ret(buffer, (char *) buf, 8) == -1)
108 return (-1); 109 return (-1);
109 *ret = get_u64(buf); 110 if (ret != NULL)
111 *ret = get_u64(buf);
110 return (0); 112 return (0);
111} 113}
112 114