Don't allow address of zero-length array to be taken to prevent run-time errors with

strict STL implementations.


git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@668610 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
This commit is contained in:
Michael Pyne 2007-05-26 23:03:17 +00:00
parent 91046cf73f
commit e08587db9a

View File

@ -432,6 +432,9 @@ int ByteVector::endsWithPartialMatch(const ByteVector &pattern) const
ByteVector &ByteVector::append(const ByteVector &v)
{
if(v.d->size == 0)
return *this; // Simply return if appending nothing.
detach();
uint originalSize = d->size;