From patchwork Wed Dec 10 13:21:53 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?T25kxZllaiBCw61sa2E=?= X-Patchwork-Id: 419657 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 333C01400B7 for ; Thu, 11 Dec 2014 00:22:30 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:mime-version :content-type; q=dns; s=default; b=kinpHadDfFT8tXcpd3kPhF3tpyzAz Gq+hpep6eGtQqQIT6YOgiNxhUnhflKPuQwnRHd7CqCC/fnvzIvsCPWINMVBqLrmR Wk1kXn92JBlzvyF7lT953L4sl2ksZlugx8zeOKFPkxOthu8OcPdCWq6Q7L0KJaNA oFrLIMPqgqIw9E= 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:date:from:to:subject:message-id:mime-version :content-type; s=default; bh=CC7X0uTZkuiRXzNMWLuWInaxkso=; b=X0j OW06obfEoL7FcZrQvlJ++Xrb16N4jCiEianAtKWXEvgkX5gXRTNWiBy/MEmCkrn8 swqP8sUucNXkTpYJWPHhBNtEmbtCqaCa291x5gQYsl5kW9ceAbBzwe792pXTY/eD DkZYOWJSVn90fKbZUq1aBa3fvZsCissdE83EQD4o= Received: (qmail 2292 invoked by alias); 10 Dec 2014 13:22:25 -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 2279 invoked by uid 89); 10 Dec 2014 13:22:24 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.7 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, SPF_NEUTRAL autolearn=no version=3.3.2 X-HELO: popelka.ms.mff.cuni.cz Date: Wed, 10 Dec 2014 14:21:53 +0100 From: =?utf-8?B?T25kxZllaiBCw61sa2E=?= To: libc-alpha@sourceware.org Subject: [PATCH][BZ #17657] Return allocated array instead array on stack. Message-ID: <20141210132153.GA6395@domone> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) Hi, here we return array on stack which is invalid. OK to fix it in obvious way? [BZ #17657] * locale/programs/ld-ctype.c (find_translit2): Allocate returned array. diff --git a/locale/programs/ld-ctype.c b/locale/programs/ld-ctype.c index 67846b3..103fc63 100644 --- a/locale/programs/ld-ctype.c +++ b/locale/programs/ld-ctype.c @@ -1777,7 +1777,7 @@ find_translit2 (struct locale_ctype_t *ctype, const struct charmap_t *charmap, for (wi = tirunp->from; wi <= wch; wi += tirunp->step) if (wi == wch) - return (uint32_t []) { 0 }; + return (uint32_t *) xcalloc (1, sizeof (uint32_t)); } }