summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2010-04-16 15:51:45 +1000
committerDamien Miller <djm@mindrot.org>2010-04-16 15:51:45 +1000
commitd6fc3065dab4ee42ad728070f14c0293c55fe86b (patch)
treeadcf10f8a1abef3dc73b7f1cf50361f17ec8bdbb
parenta45f1c03455d750bf86174ca1a2b243f1d671f55 (diff)
- OpenBSD CVS Sync
- djm@cvs.openbsd.org 2010/03/26 03:13:17 [bufaux.c] allow buffer_get_int_ret/buffer_get_int64_ret to take a NULL pointer argument to allow skipping past values in a buffer
-rw-r--r--ChangeLog5
-rw-r--r--bufaux.c8
2 files changed, 10 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 46e5a98a..5091d4a7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
20100416
- (djm) Release openssh-5.5p1
+ - OpenBSD CVS Sync
+ - djm@cvs.openbsd.org 2010/03/26 03:13:17
+ [bufaux.c]
+ allow buffer_get_int_ret/buffer_get_int64_ret to take a NULL pointer
+ argument to allow skipping past values in a buffer
20100410
- (dtucker) [configure.ac] Put the check for the existence of getaddrinfo
diff --git a/bufaux.c b/bufaux.c
index 4ef19c45..854fd510 100644
--- a/bufaux.c
+++ b/bufaux.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bufaux.c,v 1.48 2010/02/02 22:49:34 djm Exp $ */
+/* $OpenBSD: bufaux.c,v 1.49 2010/03/26 03:13:17 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -84,7 +84,8 @@ buffer_get_int_ret(u_int *ret, Buffer *buffer)
if (buffer_get_ret(buffer, (char *) buf, 4) == -1)
return (-1);
- *ret = get_u32(buf);
+ if (ret != NULL)
+ *ret = get_u32(buf);
return (0);
}
@@ -106,7 +107,8 @@ buffer_get_int64_ret(u_int64_t *ret, Buffer *buffer)
if (buffer_get_ret(buffer, (char *) buf, 8) == -1)
return (-1);
- *ret = get_u64(buf);
+ if (ret != NULL)
+ *ret = get_u64(buf);
return (0);
}