[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdeextragear-3/kdebluetooth/libqobex/qobex
From: Simone Gotti <simone.gotti () email ! it>
Date: 2004-10-04 18:07:25
Message-ID: 20041004180725.03D7C16AE5 () office ! kde ! org
[Download RAW message or body]
CVS commit by sgotti:
The Obexheader type should be a null terminated string.
Thanks a lot to Marco Manfredini for discovering the problem and providing a patch.
M +6 -1 qobexheader.cpp 1.5
--- kdeextragear-3/kdebluetooth/libqobex/qobex/qobexheader.cpp #1.4:1.5
@@ -68,5 +68,10 @@ QObexHeader::QObexHeader(const Q_UINT8 i
}
} else if ( dataType() == QObexHeader::ByteSequence ) {
- mData.duplicate( data.latin1(), data.length() );
+ // The Type header should be null terminated.
+ if (id == QObexHeader::Type) {
+ mData.duplicate( data.latin1(), data.length()+1 );
+ } else {
+ mData.duplicate( data.latin1(), data.length());
+ }
} else if ( dataType() == QObexHeader::Byte ) {
Q_ASSERT( data.length() != 1 );
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic