From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-x532.google.com (mail-ed1-x532.google.com [IPv6:2a00:1450:4864:20::532]) by sourceware.org (Postfix) with ESMTPS id 4E8C73858D20 for ; Wed, 20 Sep 2023 10:09:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4E8C73858D20 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-ed1-x532.google.com with SMTP id 4fb4d7f45d1cf-532c66a105bso1880652a12.3 for ; Wed, 20 Sep 2023 03:09:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1695204580; x=1695809380; darn=sourceware.org; h=content-transfer-encoding:in-reply-to:organization:from:references :cc:to:content-language:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=UALqKRqxncoOii6N3r4luE4b+fEM6b5Kj7XOxauVtLw=; b=afVPjGPHI9k8T+IQ4/oJ/uuhh9zo72uA2N7fAKI7ccU9rNnhgQu+SIQMXPqAtepH5D ieDBVCuhHKl+eVte7R3wGKqt2lvJU57QrXKp5IzGvsXbXwVRXYzp5/noU9qhrhoxiseu 4x+n6K35/yn6PlcwtvXBv4s3Q97CgTplN0pMdl2D3mnvMZEBVnAC0gIX+89pLJPxnjIv Aw5ozsKZnCSE/m/XSYtYcBpW2cKTpKqRWaFkBY6shx5iHGnaTdSewaSIqilTlQM10Ne9 Y2+W3JKTwI4sww8QMkusTQREHvflGsorKxjjWn2SoulxJwxD+9UDKT2ruyopseg7ZdYX ea0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695204580; x=1695809380; h=content-transfer-encoding:in-reply-to:organization:from:references :cc:to:content-language:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=UALqKRqxncoOii6N3r4luE4b+fEM6b5Kj7XOxauVtLw=; b=EaEJmX0yp8gARklfW/R4eEuJLC3QBa6RIJM8wtyGAbHKJj/0ALgju98sTqRMuV0XbH Z4Id9LLqlHp6id1VPXrWIfZj734G4DDi3ImbtlWQp4dzxwkLOBRK9Lr3290a11jUUUJ/ uP/QFpgaupXvdeQ3OYeoiRidJQW6il5aMNuswSCadUib2lHOxirrfvbJu3kmDcfXMpM5 y5SindHpo2iUDih/05lXe15ersNuF2XoUbgyz7Ccl+lsTAcgT4pi+m5cOJkQV6rlJgSI acPLSmrXAKBi4TMkLjhN4WS6ynFw5FKNz+0YI+ATFSFPlht9CuUZc3wx8pPfASrMzPhz kU3g== X-Gm-Message-State: AOJu0YxO/6VBHb9PRunXf24ODdPEEB6xQzdi+Sby6kkt/EmPbZ475PFT 6eHWJ1yaug1lHUQOpvWdPGWMq6r3whZ0r2TexcscFIH6 X-Google-Smtp-Source: AGHT+IF/ziuHmbUU8/chOjF1HZ/mu+Bl2iloUmam0av49QqMg9+MJvyuHiBEG1hrM0++oYanpn5ghg== X-Received: by 2002:a17:906:8463:b0:9ae:4911:e7ab with SMTP id hx3-20020a170906846300b009ae4911e7abmr1088850ejc.12.1695204579966; Wed, 20 Sep 2023 03:09:39 -0700 (PDT) Received: from [172.20.43.239] (static-212-193-78-212.thenetworkfactory.nl. [212.78.193.212]) by smtp.gmail.com with ESMTPSA id u22-20020a170906409600b0099364d9f0e2sm9180341ejj.98.2023.09.20.03.09.38 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 20 Sep 2023 03:09:39 -0700 (PDT) Message-ID: Date: Wed, 20 Sep 2023 12:09:38 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] resolve: Remove __res_context_query alloca usage Content-Language: en-US To: Florian Weimer Cc: libc-alpha@sourceware.org, Joe Simmons-Talbott References: <20230914175407.2406866-1-adhemerval.zanella@linaro.org> <87jzss1off.fsf@oldenburg3.str.redhat.com> From: Adhemerval Zanella Netto Organization: Linaro In-Reply-To: <87jzss1off.fsf@oldenburg3.str.redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 14/09/23 17:37, Florian Weimer wrote: > * Adhemerval Zanella: > >> @@ -146,20 +150,20 @@ __res_context_query (struct resolv_context *ctx, const char *name, >> /* Align the buffer. */ >> int npad = ((nquery1 + __alignof__ (HEADER) - 1) >> & ~(__alignof__ (HEADER) - 1)) - nquery1; >> - if (n > bufsize - npad) >> + if (n > buf.length - npad) >> { >> n = -1; >> goto unspec_nomem; >> } >> int nused = n + npad; > > The alignment code shouldn't be necessary anymore. Indeed, I will update the patch.