-/* $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
*
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;
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)
-/* $OpenBSD: sshbuf.h,v 1.16 2019/07/16 13:18:39 djm Exp $ */
+/* $OpenBSD: sshbuf.h,v 1.17 2019/07/30 05:04:49 djm Exp $ */
/*
* Copyright (c) 2011 Damien Miller
*
* all.
*/
int sshbuf_cmp(const struct sshbuf *b, size_t offset,
- const u_char *s, size_t len);
+ const void *s, size_t len);
/*
* Searches the buffer for the specified string. Returns 0 on success
*/
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);
/*
* Duplicate the contents of a buffer to a string (caller to free).