To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=106478
                 Issue #|106478
                 Summary|ucb: ftpurl.cxx: memory leak
               Component|ucb
                 Version|DEV300m63
                Platform|All
                     URL|
              OS/Version|Linux
                  Status|UNCONFIRMED
       Status whiteboard|
                Keywords|
              Resolution|
              Issue type|DEFECT
                Priority|P3
            Subcomponent|code
             Assigned to|mhu
             Reported by|dcb314





------- Additional comments from dcb...@openoffice.org Fri Oct 30 10:58:26 
+0000 2009 -------
For source code file ucb/source/ucp/ftp/ftpurl.cxx,
I notice the following code

        char *buffer = new char[1+aIdent.getLength()];

        const char* p2 = aIdent.getStr();

        rtl::OString lower = aIdent.toAsciiLowerCase();
        if(lower.getLength() < 6 ||
           strncmp("ftp://",lower.getStr(),6))
                throw malformed_exception();

If the throw is taken, then buffer is a memory leak. Suggest new code

        const char* p2 = aIdent.getStr();

        rtl::OString lower = aIdent.toAsciiLowerCase();
        if(lower.getLength() < 6 ||
           strncmp("ftp://",lower.getStr(),6))
                throw malformed_exception();

       char *buffer = new char[1+aIdent.getLength()];

---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@ucb.openoffice.org
For additional commands, e-mail: issues-h...@ucb.openoffice.org


---------------------------------------------------------------------
To unsubscribe, e-mail: allbugs-unsubscr...@openoffice.org
For additional commands, e-mail: allbugs-h...@openoffice.org

Reply via email to