From 8b61b5765ddec233828b47e346fcbf6cf12caed5 Mon Sep 17 00:00:00 2001 From: tedu <> Date: Mon, 25 Dec 2017 02:11:19 +0000 Subject: [PATCH] memcpy from the right place. at this point, the used variable is not relevant. from Mark Karpilovskij. ok millert --- src/lib/libc/hash/siphash.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/libc/hash/siphash.c b/src/lib/libc/hash/siphash.c index 845c8b6f..621d1b5b 100644 --- a/src/lib/libc/hash/siphash.c +++ b/src/lib/libc/hash/siphash.c @@ -1,4 +1,4 @@ -/* $OpenBSD: siphash.c,v 1.6 2017/04/12 17:41:49 deraadt Exp $ */ +/* $OpenBSD: siphash.c,v 1.7 2017/12/25 02:11:19 tedu Exp $ */ /*- * Copyright (c) 2013 Andre Oppermann @@ -104,7 +104,7 @@ SipHash_Update(SIPHASH_CTX *ctx, int rc, int rf, const void *src, size_t len) } if (len > 0) - memcpy(&ctx->buf[used], ptr, len); + memcpy(ctx->buf, ptr, len); } DEF_WEAK(SipHash_Update);