Menu

#18 Fix for bad free()

open
nobody
None
5
2005-08-04
2005-08-04
Anonymous
No

Here's the problem:

g4% uname -a
Darwin g4.house 7.9.0 Darwin Kernel Version 7.9.0: Wed Mar 30 20:
11:17 PST 2005; root:xnu/xnu-517.12.7.obj~1/RELEASE_PPC
Power Macintosh powerpc
g4% id3v2 -T 2/3 foo.mp3
*** malloc[20353]: Deallocation of a pointer not malloced:
0x8fe12500; This could be a double free(), or free() called with the
middle of an allocated block; Try setting environment variable
MallocHelp to see tools to help debug

Here's the patch:

--- old/id3v2.cpp Tue May 4 11:30:15 2004
+++ new/id3v2.cpp Thu Aug 4 09:20:49 2005
@@ -423,7 +423,7 @@
{
// check if there is a total track number and if we only have
// the track number for this file. In this case combine them.
- char *currentTrackNum, *newTrackNum;
+ char *currentTrackNum, *newTrackNum = NULL;

if (pFrame != NULL)
{

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.