Return-Path: X-Original-To: apmail-httpd-dev-archive@www.apache.org Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3F44FD45A for ; Wed, 12 Dec 2012 21:44:40 +0000 (UTC) Received: (qmail 91133 invoked by uid 500); 12 Dec 2012 21:44:39 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 91024 invoked by uid 500); 12 Dec 2012 21:44:38 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 91011 invoked by uid 99); 12 Dec 2012 21:44:38 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 Dec 2012 21:44:38 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [80.12.242.124] (HELO smtp.smtpout.orange.fr) (80.12.242.124) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 Dec 2012 21:44:29 +0000 Received: from [127.0.0.1] ([92.140.239.190]) by mwinf5d55 with ME id alk71k00H47AR1G03lk7ii; Wed, 12 Dec 2012 22:44:09 +0100 Message-ID: <50C8FAA6.5090202@wanadoo.fr> Date: Wed, 12 Dec 2012 22:44:06 +0100 From: Marion & Christophe JAILLET User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: dev@httpd.apache.org CC: humbedooh@apache.org, cvs@httpd.apache.org Subject: Re: svn commit: r1420377 - in /httpd/httpd/trunk: docs/manual/mod/mod_lua.xml modules/lua/lua_apr.c modules/lua/lua_apr.h modules/lua/mod_lua.c References: <20121211200839.959322388962@eris.apache.org> In-Reply-To: <20121211200839.959322388962@eris.apache.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Antivirus: avast! (VPS 121212-0, 12/12/2012), Outbound message X-Antivirus-Status: Clean X-Virus-Checked: Checked by ClamAV on apache.org Here are a few things triggered by cppcheck. Le 11/12/2012 21:08, humbedooh@apache.org a écrit : > Author: humbedooh > Date: Tue Dec 11 20:08:24 2012 > New Revision: 1420377 > > URL: http://svn.apache.org/viewvc?rev=1420377&view=rev > Log: > mod_lua: Add a lot of core httpd/apr functionality to mod_lua > (such as regex matching, expr evaluation, changing/fetching server configuration/info - see docs for a complete list). > This also includes a bunch of automatically scraped functions, which may or may not be super useful. > Comments appreciated as always, especially on the more hacky bits. > > > Modified: httpd/httpd/trunk/modules/lua/lua_apr.c > URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/lua/lua_apr.c?rev=1420377&r1=1420376&r2=1420377&view=diff > ============================================================================== > --- httpd/httpd/trunk/modules/lua/lua_apr.c (original) > +++ httpd/httpd/trunk/modules/lua/lua_apr.c Tue Dec 11 20:08:24 2012 I've put the parsed file on: http://people.apache.org/~jailletc36/lua_apr.html Check it from there. Things noticed by cppcheck are red-marked. Except the 'The scope of the variable '...' can be reduced' that can be ignored, all the other remarks are relevant. Especially: a useless apr_pcalloc (line 249) a out of bound access (line 321) --> I don't know if Rsha1 should be [20] or if the loop should be limited to < 16 this seems to be a cut and paste error from lua_apr_md5 a uninitialized variable (line 430) CJ