diff options
author | djm@openbsd.org <djm@openbsd.org> | 2019-07-30 07:04:49 +0200 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2019-07-30 07:06:27 +0200 |
commit | 49fa065a1bfaeb88a59abdfa4432d3b9c35b0655 (patch) | |
tree | 380c68f0d410d4733aa2924fa43ef309fe47d896 /sshbuf-misc.c | |
parent | upstream: When using a combination of a Yubikey+GnuPG+remote (diff) | |
download | openssh-49fa065a1bfaeb88a59abdfa4432d3b9c35b0655.tar.xz openssh-49fa065a1bfaeb88a59abdfa4432d3b9c35b0655.zip |
upstream: let sshbuf_find/cmp take a void* for the
search/comparison argument, instead of a u_char*. Saves callers needing to
cast.
OpenBSD-Commit-ID: d63b69b7c5dd570963e682f758f5a47b825605ed
Diffstat (limited to 'sshbuf-misc.c')
-rw-r--r-- | sshbuf-misc.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sshbuf-misc.c b/sshbuf-misc.c index 417ab593e..65987e251 100644 --- a/sshbuf-misc.c +++ b/sshbuf-misc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sshbuf-misc.c,v 1.10 2019/07/18 13:26:00 djm Exp $ */ +/* $OpenBSD: sshbuf-misc.c,v 1.11 2019/07/30 05:04:49 djm Exp $ */ /* * Copyright (c) 2011 Damien Miller * @@ -195,7 +195,7 @@ sshbuf_dup_string(struct sshbuf *buf) int sshbuf_cmp(const struct sshbuf *b, size_t offset, - const u_char *s, size_t len) + const void *s, size_t len) { if (sshbuf_ptr(b) == NULL) return SSH_ERR_INTERNAL_ERROR; @@ -210,13 +210,12 @@ sshbuf_cmp(const struct sshbuf *b, size_t offset, int sshbuf_find(const struct sshbuf *b, size_t start_offset, - const u_char *s, size_t len, size_t *offsetp) + const void *s, size_t len, size_t *offsetp) { void *p; if (offsetp != NULL) *offsetp = 0; - if (sshbuf_ptr(b) == NULL) return SSH_ERR_INTERNAL_ERROR; if (start_offset > SSHBUF_SIZE_MAX || len > SSHBUF_SIZE_MAX || len == 0) |