summaryrefslogtreecommitdiff
path: root/util.h
diff options
context:
space:
mode:
authorDavid Carlier <devnexen@gmail.com>2019-12-06 11:12:16 +0000
committerdormando <dormando@rydia.net>2020-01-13 17:38:48 -0800
commit81d6ddce19e40093d952bb9d0dcd8b00af09d476 (patch)
tree999547d6682d143a1671bf43a8b4018aafeb4b45 /util.h
parent6beabdff0ac3b487413f7e8bde3bb7a0c659b17e (diff)
downloadmemcached-81d6ddce19e40093d952bb9d0dcd8b00af09d476.tar.gz
auth file, using alternative bcmp implementation
... instead to check the token. less optimised than the usual memcmp especially it goes through the whole buffers but more resilient against possible attacks. While at it, constifying a var which should have been.
Diffstat (limited to 'util.h')
-rw-r--r--util.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/util.h b/util.h
index dc646a2..508c8e5 100644
--- a/util.h
+++ b/util.h
@@ -18,6 +18,7 @@ bool safe_strtoul(const char *str, uint32_t *out);
bool safe_strtol(const char *str, int32_t *out);
bool safe_strtod(const char *str, double *out);
bool safe_strcpy(char *dst, const char *src, const size_t dstmax);
+bool safe_memcmp(const void *a, const void *b, size_t len);
#ifndef HAVE_HTONLL
extern uint64_t htonll(uint64_t);