diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | bufaux.c | 8 |
2 files changed, 10 insertions, 3 deletions
@@ -1,5 +1,10 @@ | |||
1 | 20100416 | 1 | 20100416 |
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 | ||
4 | 20100410 | 9 | 20100410 |
5 | - (dtucker) [configure.ac] Put the check for the existence of getaddrinfo | 10 | - (dtucker) [configure.ac] Put the check for the existence of getaddrinfo |
@@ -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 | ||