diff options
author | Arno <arno@disconnect.de> | 2017-02-26 22:31:06 +0100 |
---|---|---|
committer | Arno <arno@disconnect.de> | 2017-02-26 22:31:06 +0100 |
commit | a2b53adc364b0edb1d08ca3588e2ee3bc6d03b1a (patch) | |
tree | 87cef28814a1e9f8b92031a91cad0525fc09ebf2 | |
parent | 6e45311d1431953fe4263cdc21e52ffaf584c0d2 (diff) | |
download | ShemovCleaner-a2b53adc364b0edb1d08ca3588e2ee3bc6d03b1a.tar.gz ShemovCleaner-a2b53adc364b0edb1d08ca3588e2ee3bc6d03b1a.tar.bz2 ShemovCleaner-a2b53adc364b0edb1d08ca3588e2ee3bc6d03b1a.zip |
Fix TorrentParser
Don't std::bad_alloc if we have an invalid string.
-rw-r--r-- | torrentparser.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/torrentparser.cpp b/torrentparser.cpp index 635d8a7..d8fb35b 100644 --- a/torrentparser.cpp +++ b/torrentparser.cpp @@ -74,6 +74,7 @@ const QByteArray TorrentParser::parseString(){ } int len = mData.mid(mPos, lenlen).toInt(); if(mPos + len > mData.size()){ + ++mPos; return QByteArray(); } mPos = mPos + lenlen + 1; |