apr-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 61109] New: apr_app_initialize calls GlobalFree rather than LocalFree on the result of CommandLineToArgvW
Date Sat, 20 May 2017 12:08:20 GMT
https://bz.apache.org/bugzilla/show_bug.cgi?id=61109

            Bug ID: 61109
           Summary: apr_app_initialize calls GlobalFree rather than
                    LocalFree on the result of CommandLineToArgvW
           Product: APR
           Version: HEAD
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: APR
          Assignee: bugs@apr.apache.org
          Reporter: matt.tait@gmail.com
  Target Milestone: ---

In function "apr_app_initialize", the method frees the result of an earlier
call to API "CommandLineToArgvW" via the method "GlobalFree", however the
correct de-allocator is "LocalFree" (a different memory de-allocator).

This is explicitly documented in Windows as unsafe/undocumented behaviour. ("It
is not safe to free memory allocated with GlobalAlloc" -
https://msdn.microsoft.com/en-us/library/windows/desktop/aa366730(v=vs.85).aspx).

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@apr.apache.org
For additional commands, e-mail: bugs-help@apr.apache.org


Mime
View raw message