[tools-issues] [Issue 106602] cppcheck warnings

2010-03-10 Thread dcb314
To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=106602





--- Additional comments from dcb...@openoffice.org Wed Mar 10 12:26:30 
+ 2010 ---

New version 1.41 of cppcheck March 7 2010.

There are a few new messages it can produce.

-
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...@tools.openoffice.org
For additional commands, e-mail: issues-h...@tools.openoffice.org


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



[tools-issues] [Issue 106602] suggest use of new tool c ppcheck

2009-11-04 Thread dcb314
To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=106602
 Issue #|106602
 Summary|suggest use of new tool cppcheck
   Component|tools
 Version|DEV300m63
Platform|All
 URL|
  OS/Version|Linux
  Status|UNCONFIRMED
   Status whiteboard|
Keywords|
  Resolution|
  Issue type|ENHANCEMENT
Priority|P3
Subcomponent|code
 Assigned to|mh
 Reported by|dcb314





--- Additional comments from dcb...@openoffice.org Wed Nov  4 12:26:59 
+ 2009 ---
I've found the following tool useful for finding
a range of problems in C and C++ code

http://sourceforge.net/projects/cppcheck/

Indeed, I've submitted a few of the bugs it has found in the Open
Office code. 

Not everything it finds is worth fixing, and there are a few false positives.

Suggest improve code development process for Open Office project
by using the cppcheck tool more widely.

-
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...@tools.openoffice.org
For additional commands, e-mail: issues-h...@tools.openoffice.org


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



[tools-issues] [Issue 106575] box-base.cxx: use of eras ed data

2009-11-03 Thread dcb314
To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=106575
 Issue #|106575
 Summary|box-base.cxx: use of erased data
   Component|tools
 Version|DEV300m63
Platform|All
 URL|
  OS/Version|Linux
  Status|UNCONFIRMED
   Status whiteboard|
Keywords|
  Resolution|
  Issue type|DEFECT
Priority|P3
Subcomponent|code
 Assigned to|mh
 Reported by|dcb314





--- Additional comments from dcb...@openoffice.org Tue Nov  3 11:54:25 
+ 2009 ---
For source code file toolkit/source/layout/core/box-base.cxx,
function Box_Base::removeChildData, is the following code

for ( std::list ChildData* ::iterator it = lst.begin();
  it != lst.end(); it++ )
{
if ( (*it)-mxChild == xChild )
{
lst.erase( it );
return *it;
}
}

It seems to be most unwise to return data after it has been
erased. 

Suggest untested code like

for ( std::list ChildData* ::iterator it = lst.begin();
  it != lst.end(); it++ )
{
if ( (*it)-mxChild == xChild )
{
ChildData * tmp = *it;
lst.erase( it );
return tmp;
}
}

-
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...@tools.openoffice.org
For additional commands, e-mail: issues-h...@tools.openoffice.org


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



[sw-issues] [Issue 106576] wbutton.cxx: bad call to erase

2009-11-03 Thread dcb314
To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=106576
 Issue #|106576
 Summary|wbutton.cxx: bad call to erase
   Component|Word processor
 Version|DEV300m63
Platform|All
 URL|
  OS/Version|Linux
  Status|UNCONFIRMED
   Status whiteboard|
Keywords|
  Resolution|
  Issue type|DEFECT
Priority|P3
Subcomponent|code
 Assigned to|writerneedsconfirm
 Reported by|dcb314





--- Additional comments from dcb...@openoffice.org Tue Nov  3 12:02:05 
+ 2009 ---
For source code file toolkit/source/layout/vcl/wbutton.cxx,
function Remove, around line 500 is the following code

for ( std::list Window*::iterator it = maAdvanced.begin();
  it != maAdvanced.end(); it++ )
if ( *it == w )
{
lst.erase( it );
return *it;
}

So local variable it iterates over maAdvanced, but it is used
on variable lst. This looks wrong. Maybe the loop should iterate
over lst, not maAdvanced ?

-
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...@sw.openoffice.org
For additional commands, e-mail: issues-h...@sw.openoffice.org


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



[xml-issues] [Issue 106477] xmerge: XMergeFilter.cpp: memory leak

2009-10-30 Thread dcb314
To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=106477
 Issue #|106477
 Summary|xmerge: XMergeFilter.cpp: memory leak
   Component|xml
 Version|DEV300m63
Platform|All
 URL|
  OS/Version|Linux
  Status|UNCONFIRMED
   Status whiteboard|
Keywords|
  Resolution|
  Issue type|DEFECT
Priority|P3
Subcomponent|code
 Assigned to|mba
 Reported by|dcb314





--- Additional comments from dcb...@openoffice.org Fri Oct 30 10:54:04 
+ 2009 ---
For source code file xmerge/source/activesync/XMergeFilter.cpp, there is
a memory leak for local variable szJavaHome around line 380. 

The source code is

lRet = ::RegOpenKeyEx(hKey, _T(szCurrentJava), 0, KEY_READ, hDataKey);
if (lRet != ERROR_SUCCESS)
{
RegCloseKey(hKey);
return NULL;
}

Suggest new code

lRet = ::RegOpenKeyEx(hKey, _T(szCurrentJava), 0, KEY_READ, hDataKey);
if (lRet != ERROR_SUCCESS)
{
RegCloseKey(hKey);
delete [] szJavaHome;
return NULL;
}

-
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...@xml.openoffice.org
For additional commands, e-mail: issues-h...@xml.openoffice.org


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



[ucb-issues] [Issue 106478] ucb: ftpurl.cxx: memory l eak

2009-10-30 Thread dcb314
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 
+ 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



[sw-issues] [Issue 106481] sw: docxattributeoutput.c xx: 2 * bad call to erase

2009-10-30 Thread dcb314
To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=106481
 Issue #|106481
 Summary|sw: docxattributeoutput.cxx: 2 * bad call to erase
   Component|Word processor
 Version|DEV300m63
Platform|All
 URL|
  OS/Version|Linux
  Status|UNCONFIRMED
   Status whiteboard|
Keywords|
  Resolution|
  Issue type|DEFECT
Priority|P3
Subcomponent|code
 Assigned to|ama
 Reported by|dcb314





--- Additional comments from dcb...@openoffice.org Fri Oct 30 11:20:44 
+ 2009 ---
For source code file sw/source/filter/ww8/docxattributeoutput.cxx,
function DocxAttributeOutput::EndRun, around line 351 is the code

m_Fields.erase( pIt );

This looks like a bad call to erase to me. Suggest new code

pIt = m_Fields.erase( pIt );

The same thing happens in the same file, around line 383. 
The source code is

   m_Fields.erase( pIt );

-
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...@sw.openoffice.org
For additional commands, e-mail: issues-h...@sw.openoffice.org


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



[framework-issues] [Issue 106430] binfilter: sch_docshell.c xx: 2 * possible null pointer dereference

2009-10-29 Thread dcb314
To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=106430
 Issue #|106430
 Summary|binfilter: sch_docshell.cxx: 2 * possible null pointer
| dereference 
   Component|framework
 Version|DEV300m63
Platform|All
 URL|
  OS/Version|Linux
  Status|UNCONFIRMED
   Status whiteboard|
Keywords|
  Resolution|
  Issue type|DEFECT
Priority|P3
Subcomponent|code
 Assigned to|mba
 Reported by|dcb314





--- Additional comments from dcb...@openoffice.org Thu Oct 29 11:34:42 
+ 2009 ---
For source code file binfilter/bf_sch/source/ui/docshell/sch_docshell.cxx,
around line 641 is source code 

long nFileFormat = pStor-GetVersion();

but the very next use of pStor, a little later, is

   if( pStor )

So the first line assumes that pStor is legal, when
the second line indicates that it might not be.

Suggest code rework. Maybe a test of pStor before first use
would be enough.

The same thing happens around line 787 of the same file,
function SchChartDocShell::SaveAs, same local variable name pStor.

-
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...@framework.openoffice.org
For additional commands, e-mail: issues-h...@framework.openoffice.org


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



[installation-issues] [Issue 106431] ulfconv.cxx: resource lea k

2009-10-29 Thread dcb314
To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=106431
 Issue #|106431
 Summary|ulfconv.cxx: resource leak
   Component|Installation
 Version|DEV300m63
Platform|All
 URL|
  OS/Version|Linux
  Status|UNCONFIRMED
   Status whiteboard|
Keywords|
  Resolution|
  Issue type|DEFECT
Priority|P4
Subcomponent|code
 Assigned to|of
 Reported by|dcb314





--- Additional comments from dcb...@openoffice.org Thu Oct 29 11:50:44 
+ 2009 ---
For source code file setup_native/source/ulfconv/ulfconv.cxx,
around line 164 is the source code line

   FILE * fp = fopen(file, r);

I fail to find a matching call to fclose. This looks
like a resource leak to me. Suggest add call to fclose.

-
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...@installation.openoffice.org
For additional commands, e-mail: issues-h...@installation.openoffice.org


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



[framework-issues] [Issue 103767] filter: hwpfilter/source/ cspline.cpp: memory leak

2009-07-24 Thread dcb314
To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=103767
 Issue #|103767
 Summary|filter: hwpfilter/source/cspline.cpp: memory leak
   Component|framework
 Version|OOo 3.1
Platform|All
 URL|
  OS/Version|Linux
  Status|UNCONFIRMED
   Status whiteboard|
Keywords|
  Resolution|
  Issue type|PATCH
Priority|P4
Subcomponent|code
 Assigned to|mba
 Reported by|dcb314





--- Additional comments from dcb...@openoffice.org Fri Jul 24 08:38:02 
+ 2009 ---
For the source code file hwpfilter/source/cspline.cpp,
around line 131 is the source code

  double* h = new double[N];

The matching 

  delete [] h; h = 0;

seems to be missing. Suggest add to avoid memory leak.

-
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...@framework.openoffice.org
For additional commands, e-mail: issues-h...@framework.openoffice.org


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



[tools-issues] [Issue 103768] soltools/mkdepend/main.c: resource leak

2009-07-24 Thread dcb314
To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=103768
 Issue #|103768
 Summary|soltools/mkdepend/main.c:resource leak
   Component|tools
 Version|OOo 3.1
Platform|All
 URL|
  OS/Version|Linux
  Status|UNCONFIRMED
   Status whiteboard|
Keywords|
  Resolution|
  Issue type|DEFECT
Priority|P4
Subcomponent|solenv
 Assigned to|hjs
 Reported by|dcb314





--- Additional comments from dcb...@openoffice.org Fri Jul 24 09:00:47 
+ 2009 ---
For source code file soltools/mkdepend/main.c,
around line 660 is the source code for function
redirect.

I can see source code line

   if ((fdin = fopen(makefile, r)) == NULL)

but no matching call to fclose. This seems to be a resource
leak to me. Suggest add call to fclose, somewhere near
the end of the routine.

-
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...@tools.openoffice.org
For additional commands, e-mail: issues-h...@tools.openoffice.org


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



[porting-issues] [Issue 103769] stoc/source/invocation/in vocation.cxx: memory leak

2009-07-24 Thread dcb314
To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=103769
 Issue #|103769
 Summary|stoc/source/invocation/invocation.cxx: memory leak
   Component|porting
 Version|OOo 3.1
Platform|All
 URL|
  OS/Version|Linux
  Status|UNCONFIRMED
   Status whiteboard|
Keywords|
  Resolution|
  Issue type|DEFECT
Priority|P4
Subcomponent|code
 Assigned to|mh
 Reported by|dcb314





--- Additional comments from dcb...@openoffice.org Fri Jul 24 09:07:44 
+ 2009 ---
Around line 800 of the above file is the source code

MemberItem* pItems = new MemberItem[ nTotalCount ];

I can't see the matching 

delete [] pItems; pItems = 0;

so there seems to be a memory leak here. Suggest code rework.

-
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...@porting.openoffice.org
For additional commands, e-mail: issues-h...@porting.openoffice.org


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



[tools-issues] [Issue 103770] tools/workben/solar.c: mi ssing call to fclose

2009-07-24 Thread dcb314
To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=103770
 Issue #|103770
 Summary|tools/workben/solar.c: missing call to fclose
   Component|tools
 Version|OOo 3.1
Platform|All
 URL|
  OS/Version|Linux
  Status|UNCONFIRMED
   Status whiteboard|
Keywords|
  Resolution|
  Issue type|DEFECT
Priority|P4
Subcomponent|code
 Assigned to|mh
 Reported by|dcb314





--- Additional comments from dcb...@openoffice.org Fri Jul 24 09:16:40 
+ 2009 ---
For the source code file tools/workben/solar.c,
around line 340 is the source code

  FILE* f = fopen( name, w );

I can't see a matching call to fclose, so this looks
like a memory leak to me. Suggest add call, to close
the leak.

-
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...@tools.openoffice.org
For additional commands, e-mail: issues-h...@tools.openoffice.org


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



[tools-issues] [Issue 103749] cpputools/source/regcompl azy/regcomplazy.cxx: resource leak

2009-07-23 Thread dcb314
To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=103749
 Issue #|103749
 Summary|cpputools/source/regcomplazy/regcomplazy.cxx: resource
| leak
   Component|tools
 Version|1.0.3
Platform|All
 URL|
  OS/Version|Linux
  Status|UNCONFIRMED
   Status whiteboard|
Keywords|
  Resolution|
  Issue type|DEFECT
Priority|P3
Subcomponent|code
 Assigned to|mh
 Reported by|dcb314





--- Additional comments from dcb...@openoffice.org Thu Jul 23 17:16:40 
+ 2009 ---
I just had my first look at the source code of Open Office.

For source code file cpputools/source/regcomplazy/regcomplazy.cxx,
around line 115 is the following source code

FILE* fDescr = fopen(argv[ ++nPos ], r);

I cannot find a matching call to fclose, so this looks like a memory leak.
Suggest code rework.

-
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...@tools.openoffice.org
For additional commands, e-mail: issues-h...@tools.openoffice.org


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