Return-Path: X-Original-To: apmail-subversion-commits-archive@minotaur.apache.org Delivered-To: apmail-subversion-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8518117214 for ; Thu, 3 Sep 2015 16:33:32 +0000 (UTC) Received: (qmail 87251 invoked by uid 500); 3 Sep 2015 16:33:32 -0000 Delivered-To: apmail-subversion-commits-archive@subversion.apache.org Received: (qmail 87226 invoked by uid 500); 3 Sep 2015 16:33:32 -0000 Mailing-List: contact commits-help@subversion.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@subversion.apache.org Delivered-To: mailing list commits@subversion.apache.org Received: (qmail 87216 invoked by uid 99); 3 Sep 2015 16:33:32 -0000 Received: from eris.apache.org (HELO hades.apache.org) (140.211.11.105) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Sep 2015 16:33:32 +0000 Received: from hades.apache.org (localhost [127.0.0.1]) by hades.apache.org (ASF Mail Server at hades.apache.org) with ESMTP id E275BAC0054 for ; Thu, 3 Sep 2015 16:33:31 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1701064 - /subversion/trunk/subversion/libsvn_subr/io.c Date: Thu, 03 Sep 2015 16:33:31 -0000 To: commits@subversion.apache.org From: ivan@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20150903163331.E275BAC0054@hades.apache.org> Author: ivan Date: Thu Sep 3 16:33:31 2015 New Revision: 1701064 URL: http://svn.apache.org/r1701064 Log: * subversion/libsvn_subr/io.c (win_init_dynamic_imports): Check return value from GetModuleHandle("kernel32.dll") for NULL even it's almost impossible situation. Modified: subversion/trunk/subversion/libsvn_subr/io.c Modified: subversion/trunk/subversion/libsvn_subr/io.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/io.c?rev=1701064&r1=1701063&r2=1701064&view=diff ============================================================================== --- subversion/trunk/subversion/libsvn_subr/io.c (original) +++ subversion/trunk/subversion/libsvn_subr/io.c Thu Sep 3 16:33:31 2015 @@ -1861,11 +1861,15 @@ io_win_file_attrs_set(const char *fname, static svn_error_t *win_init_dynamic_imports(void *baton, apr_pool_t *pool) { - get_final_path_name_by_handle_proc = (GETFINALPATHNAMEBYHANDLE) - GetProcAddress(GetModuleHandleA("kernel32.dll"), - "GetFinalPathNameByHandleW"); + HMODULE kernel32 = GetModuleHandleA("kernel32.dll"); - return SVN_NO_ERROR; + if (kernel32) + { + get_final_path_name_by_handle_proc = (GETFINALPATHNAMEBYHANDLE) + GetProcAddress(kernel32, "GetFinalPathNameByHandleW"); + } + + return SVN_NO_ERROR; } static svn_error_t * io_win_read_link(svn_string_t **dest,