From b6c9d0a561260e1a63964f2d23e9bc4f3f28f680 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Sun, 17 Aug 2008 21:39:52 +0200 Subject: fix iteration through addrinfo when seriliazing (pointed out by Damien Thébault) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bootstrap.sh | 2 +- libasyncns/asyncns.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bootstrap.sh b/bootstrap.sh index 6a60400..498c9b8 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # This file is part of libasyncns. # diff --git a/libasyncns/asyncns.c b/libasyncns/asyncns.c index bc546f4..b4d7087 100644 --- a/libasyncns/asyncns.c +++ b/libasyncns/asyncns.c @@ -429,7 +429,7 @@ static int send_addrinfo_reply(int out_fd, unsigned id, int ret, struct addrinfo for (k = ai; k; k = k->ai_next) { - if (!(p = serialize_addrinfo(p, ai, &resp->header.length, (char*) data + BUFSIZE - (char*) p))) { + if (!(p = serialize_addrinfo(p, k, &resp->header.length, (char*) data + BUFSIZE - (char*) p))) { resp->ret = EAI_MEMORY; break; } -- cgit