593150ca5d9bf3beeb743bd34919ed41eb39ebd2
[openwrt/staging/luka.git] /
1 From 2c594732eb7391e7cfa817598e33e61cab71131f Mon Sep 17 00:00:00 2001
2 From: Simon Kelley <simon@thekelleys.org.uk>
3 Date: Thu, 3 Jan 2019 13:42:03 +0000
4 Subject: [PATCH 22/57] File logic bug in cache-marshalling code. Introduced a
5 couple of commits back.
6
7 Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
8 ---
9 src/cache.c | 3 +--
10 1 file changed, 1 insertion(+), 2 deletions(-)
11
12 --- a/src/cache.c
13 +++ b/src/cache.c
14 @@ -742,8 +742,7 @@ int cache_recv_insert(time_t now, int fd
15 else if (flags & F_DS)
16 {
17 if (!read_write(fd, (unsigned char *)&class, sizeof(class), 1) ||
18 - (flags & F_NEG) ||
19 - !(addr.key.keydata = blockdata_read(fd, addr.key.keylen)))
20 + (!(flags & F_NEG) && !(addr.key.keydata = blockdata_read(fd, addr.key.keylen))))
21 return 0;
22 }
23 #endif