From patchwork Tue Oct 6 12:08:26 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 526716 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 6EAAB140D71 for ; Tue, 6 Oct 2015 23:08:37 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b=JKD3kMHD; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:to:from:subject:message-id:date:mime-version :content-type; q=dns; s=default; b=IqP+GZE3poXu7Pn1tKc1TsOigUD5H LKIXOs0Mf5gKgyCRraEG7selUv4BVQgvj8ET0rT0m9ip7pYFRbodme/5L6Ng1WLW BtspzeiBo3RG+3WCX672aAtBZy0iB7DWYAglYyN00hR3ADJ3cAvj3fVa73uYc3qU 2FmxV5HEGdnn2Q= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:to:from:subject:message-id:date:mime-version :content-type; s=default; bh=EKKHsQAVbj1kFwZkyMqrIlLaWzc=; b=JKD 3kMHDbzhnjkVDyFzgSJLzwagSPvgJl9B0eUqfAKWWsSu1B9vOAHJSOPq02cIc9MH NjUTvlJsPdPkfeUEq2NiVINuqv5wxvX42W8/gd28enBhhdVGd8AazK9Hmzt7enlR 7rsReE2AnArrQIHthqyMuCMq18vJ9qvmA38iJB0w= Received: (qmail 88430 invoked by alias); 6 Oct 2015 12:08:31 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 85448 invoked by uid 89); 6 Oct 2015 12:08:30 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.3 required=5.0 tests=AWL, BAYES_50, SPF_HELO_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com To: GNU C Library From: Florian Weimer Subject: [PATCH COMMITTED] nss_nis: Do not call malloc_usable_size [BZ #10432] Message-ID: <5613B9BA.80904@redhat.com> Date: Tue, 6 Oct 2015 14:08:26 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 This is a namespace violation, and interposed malloc implementations are not required to interpose malloc_usable_size. Florian 2015-10-06 Florian Weimer [BZ #10433] * nis/nss_nis/nis-netgrp.c (_nss_nis_setnetgrent): Remove call to malloc_usable_size. diff --git a/NEWS b/NEWS index 0f3f33f..3852e7f 100644 --- a/NEWS +++ b/NEWS @@ -9,16 +9,16 @@ Version 2.23 * The following bugs are resolved with this release: - 887, 2542, 2543, 2558, 2898, 4404, 6803, 14341, 14912, 15367, 15384, - 15786, 15918, 16141, 16296, 16347, 16415, 16517, 16519, 16520, 16521, - 16620, 16734, 16973, 16985, 17118, 17243, 17244, 17250, 17441, 17787, - 17886, 17887, 17905, 18084, 18086, 18240, 18265, 18370, 18421, 18480, - 18525, 18595, 18610, 18618, 18647, 18661, 18674, 18675, 18681, 18724, - 18757, 18778, 18781, 18787, 18789, 18790, 18795, 18796, 18803, 18820, - 18823, 18824, 18825, 18857, 18863, 18870, 18872, 18873, 18875, 18887, - 18921, 18951, 18952, 18956, 18961, 18966, 18967, 18969, 18970, 18977, - 18980, 18981, 18985, 19003, 19012, 19016, 19018, 19032, 19046, 19049, - 19050, 19059, 19071. + 887, 2542, 2543, 2558, 2898, 4404, 6803, 10432, 14341, 14912, 15367, + 15384, 15786, 15918, 16141, 16296, 16347, 16415, 16517, 16519, 16520, + 16521, 16620, 16734, 16973, 16985, 17118, 17243, 17244, 17250, 17441, + 17787, 17886, 17887, 17905, 18084, 18086, 18240, 18265, 18370, 18421, + 18480, 18525, 18595, 18610, 18618, 18647, 18661, 18674, 18675, 18681, + 18724, 18757, 18778, 18781, 18787, 18789, 18790, 18795, 18796, 18803, + 18820, 18823, 18824, 18825, 18857, 18863, 18870, 18872, 18873, 18875, + 18887, 18921, 18951, 18952, 18956, 18961, 18966, 18967, 18969, 18970, + 18977, 18980, 18981, 18985, 19003, 19012, 19016, 19018, 19032, 19046, + 19049, 19050, 19059, 19071. * The obsolete header has been removed. Programs that require this header must be updated to use instead. diff --git a/nis/nss_nis/nis-netgrp.c b/nis/nss_nis/nis-netgrp.c index 44faab7..5099d25 100644 --- a/nis/nss_nis/nis-netgrp.c +++ b/nis/nss_nis/nis-netgrp.c @@ -70,7 +70,6 @@ _nss_nis_setnetgrent (const char *group, struct __netgrent *netgrp) and the last byte is filled with NUL. So we can simply use that buffer. */ assert (len >= 0); - assert (malloc_usable_size (netgrp->data) >= len + 1); assert (netgrp->data[len] == '\0'); netgrp->data_size = len;