Return-Path: Delivered-To: apmail-apr-commits-archive@www.apache.org Received: (qmail 89461 invoked from network); 17 Mar 2008 19:15:15 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 17 Mar 2008 19:15:15 -0000 Received: (qmail 8170 invoked by uid 500); 17 Mar 2008 19:15:13 -0000 Delivered-To: apmail-apr-commits-archive@apr.apache.org Received: (qmail 8130 invoked by uid 500); 17 Mar 2008 19:15:13 -0000 Mailing-List: contact commits-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: Reply-To: dev@apr.apache.org List-Id: Delivered-To: mailing list commits@apr.apache.org Received: (qmail 8115 invoked by uid 99); 17 Mar 2008 19:15:13 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Mar 2008 12:15:13 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Mar 2008 19:14:24 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 200FE1A9838; Mon, 17 Mar 2008 12:14:44 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r638031 - /apr/apr/trunk/user/win32/userinfo.c Date: Mon, 17 Mar 2008 19:14:43 -0000 To: commits@apr.apache.org From: wrowe@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080317191444.200FE1A9838@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: wrowe Date: Mon Mar 17 12:14:41 2008 New Revision: 638031 URL: http://svn.apache.org/viewvc?rev=638031&view=rev Log: Provide the correct buffer size (in wchars) to ExpandEnvironmentStringsW Reported by: Sebastian Gottschalk Modified: apr/apr/trunk/user/win32/userinfo.c Modified: apr/apr/trunk/user/win32/userinfo.c URL: http://svn.apache.org/viewvc/apr/apr/trunk/user/win32/userinfo.c?rev=638031&r1=638030&r2=638031&view=diff ============================================================================== --- apr/apr/trunk/user/win32/userinfo.c (original) +++ apr/apr/trunk/user/win32/userinfo.c Mon Mar 17 12:14:41 2008 @@ -121,7 +121,8 @@ else if (type == REG_EXPAND_SZ) { apr_wchar_t path[MAX_PATH]; char retdir[MAX_PATH]; - ExpandEnvironmentStringsW((apr_wchar_t*)regkey, path, sizeof(path)); + ExpandEnvironmentStringsW((apr_wchar_t*)regkey, path, + sizeof(path) / 2); if ((rv = unicode_to_utf8_path(retdir, sizeof(retdir), path)) != APR_SUCCESS) return rv;