From 2d890bc579aefc579755f29369ed07a4d107a9e3 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Mon, 19 Dec 2016 02:24:24 +0100 Subject: Fix buf in libcoopgamma_get_gamma_recv where all filters are given the priority of the first filter MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/libcoopgamma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libcoopgamma.c b/src/libcoopgamma.c index abf05c5..40baf77 100644 --- a/src/libcoopgamma.c +++ b/src/libcoopgamma.c @@ -2415,7 +2415,7 @@ int libcoopgamma_get_gamma_recv(libcoopgamma_filter_table_t* restrict table, { if (off + sizeof(int64_t) > n) goto bad; - table->filters[i].priority = *(int64_t*)payload; + table->filters[i].priority = *(int64_t*)(payload + off); off += sizeof(int64_t); if (memchr(payload + off, '\0', n - off) == NULL) goto bad; -- cgit v1.2.3-70-g09d2