You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@apr.apache.org by bu...@apache.org on 2017/05/20 12:08:20 UTC

[Bug 61109] New: apr_app_initialize calls GlobalFree rather than LocalFree on the result of CommandLineToArgvW

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


[Bug 61109] apr_app_initialize calls GlobalFree rather than LocalFree on the result of CommandLineToArgvW

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61109

ivan@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #1 from ivan@apache.org ---
Fixed in r1859402.

-- 
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