Repository : ssh://git@open-mesh.org/alfred
On branch : master
commit c9a813f3e84618a133ff3cf61e11fe98852e02a0 Author: Sven Eckelmann sven@open-mesh.com Date: Thu Jan 17 18:15:23 2013 +0100
alfred: Fix length check when reading incoming unix data
Signed-off-by: Sven Eckelmann sven@open-mesh.com
c9a813f3e84618a133ff3cf61e11fe98852e02a0 unix_sock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/unix_sock.c b/unix_sock.c index f91ae73..4a5df12 100644 --- a/unix_sock.c +++ b/unix_sock.c @@ -253,7 +253,7 @@ int unix_sock_read(struct globals *globals)
packet = (struct alfred_packet *)buf;
- if (length - headsize < ((int)ntohs(packet->length))) + if ((length - headsize) < ((int)ntohs(packet->length))) goto err;
if (packet->version != ALFRED_VERSION)