Bug 443444

Summary: gstreamer-0_10-plugins-bad-0.10.8-4.8: call to wrong C++ delete
Product: [openSUSE] openSUSE 11.1 Reporter: David Binderman <dcb314>
Component: OtherAssignee: Stanislav Brabec <sbrabec>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None    
Version: Factory   
Target Milestone: ---   
Hardware: All   
OS: openSUSE 11.0   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: hal-smart-card.patch

Description David Binderman 2008-11-10 16:22:43 UTC
I just checked some of the source code in the Suse Linux factory package
gstreamer-0_10-plugins-bad-0.10.8-4.8 and I noticed the following

$ egrep "new|delete"  ../BUILD/gst-plugins-bad-0.10.8/gst/modplug/libmodplug/load_mdl.cpp | fgrep m_lpszSongComments
                                if (m_lpszSongComments) delete m_lpszSongComments;
                                m_lpszSongComments = new char[blocklen];

The if test is a waste of time and the delete is wrong. 
Suggest replace line of code with

    delete [] m_lpszSongComments; m_lpszSongComments = NULL;
Comment 1 Stanislav Brabec 2009-01-12 18:25:52 UTC
Created attachment 264603 [details]
hal-smart-card.patch
Comment 2 Stanislav Brabec 2009-01-12 18:26:28 UTC
OOPS, bad bug #.
Comment 3 Stanislav Brabec 2009-04-20 15:39:59 UTC
This code is a part of libmodplug. This code was part of gst-plugins-bad-0.10, but now it depends on an external library, which is not part of openSUSE yet, It could be probably added to keep gst-plugins-bad features.
Comment 4 Stanislav Brabec 2009-04-21 13:33:41 UTC
Reported upstream: https://sourceforge.net/tracker/?func=detail&aid=2777464&group_id=1275&atid=301275
Comment 5 Stanislav Brabec 2009-04-21 15:30:04 UTC
New libmodplug package with the fix was submitted to openSUSE:Factory.