Dirty pointer in TagLib::FLAC::FilePrivate::tag might lead to crash if no FLAC tags are read

Bjoern Petersen silverjuke at gmail.com
Sun May 14 23:13:19 CEST 2006

2006/5/14, Allan Sandfeld Jensen <kde at carewolf.com>:
> tag is pointing to one of the three possible tags ID3v1, ID3v2 or XiphComment.
> deleting it would delete one of them twice.

For me it looks as if the tag pointer is an independent object that
just *uses* the given ID3v1, ID3v2 or XiphComment pointers internally
- it is constructed using new (flacfile.cpp, line 320) ...

  if(d->hasXiphComment || d->hasID3v2 || d->hasID3v1)
    d->tag = new FLAC::Tag(d->comment, d->ID3v2Tag, d->ID3v1Tag);
    d->tag = new FLAC::Tag(new Ogg::XiphComment);

... so I think it should be deleted on ~ Flag::File::FilePrivate~FilePrivate().


More information about the taglib-devel mailing list