From 1137379e98cab8cc67fac70b31c97001c4473eb0 Mon Sep 17 00:00:00 2001 From: Peter Hartmann Date: Mon, 24 Jan 2011 14:21:18 +0100 Subject: HTTP: fix digest authentication no need to extract the realm from the user; with digest authentication the realm is an attribute of its own. Reviewed-by: Markus Goetz Task-number: QTBUG-15070 --- src/network/kernel/qauthenticator.cpp | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/src/network/kernel/qauthenticator.cpp b/src/network/kernel/qauthenticator.cpp index 73143e1..d61d3b7 100644 --- a/src/network/kernel/qauthenticator.cpp +++ b/src/network/kernel/qauthenticator.cpp @@ -213,24 +213,6 @@ void QAuthenticator::setUser(const QString &user) int separatorPosn = 0; switch(d->method) { - case QAuthenticatorPrivate::DigestMd5: - if((separatorPosn = user.indexOf(QLatin1String("\\"))) != -1) { - //domain name is present - d->userDomain.clear(); - d->realm = user.left(separatorPosn); - d->user = user.mid(separatorPosn + 1); - } else if((separatorPosn = user.indexOf(QLatin1String("@"))) != -1) { - //domain name is present - d->userDomain.clear(); - d->realm = user.mid(separatorPosn + 1); - d->user = user.left(separatorPosn); - } else { - d->user = user; - d->realm.clear(); - d->userDomain.clear(); - } - break; - case QAuthenticatorPrivate::Ntlm: if((separatorPosn = user.indexOf(QLatin1String("\\"))) != -1) { //domain name is present @@ -253,6 +235,7 @@ void QAuthenticator::setUser(const QString &user) break; default: d->user = user; + d->userDomain.clear(); break; } } -- cgit v0.12 From 81941e4c5dcd18ef04b2b22dd3f1b4c04620647c Mon Sep 17 00:00:00 2001 From: Kent Hansen Date: Mon, 24 Jan 2011 15:32:11 +0100 Subject: Fix crash in QtScript/JSC stack allocator on Symbian The reserved (virtual) size of the chunk is not necessarily a multiple of the "pool" size (the physical growth increment). The reserved size is only rounded up to a multiple of the page size (4K), not the pool size (64K). This meant that the commit of the _last_ part of the chunk could (and did) fail, because we tried to commit 64K while only a size <64K was remaining. Detect this case and reduce the requested size accordingly. Also add a call to CRASH() in case Commit() returns an error, to avoid obscure crashes in JSC at a later point (grow() must not fail). Task-number: QTBUG-16685 Reviewed-by: Simon Hausmann --- .../JavaScriptCore/wtf/symbian/RegisterFileAllocatorSymbian.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/symbian/RegisterFileAllocatorSymbian.cpp b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/symbian/RegisterFileAllocatorSymbian.cpp index da5cc99..e89dd7a 100644 --- a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/symbian/RegisterFileAllocatorSymbian.cpp +++ b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/symbian/RegisterFileAllocatorSymbian.cpp @@ -83,10 +83,16 @@ void RegisterFileAllocator::grow(void* newEnd) TInt nBytes = (TInt)(newEnd) - (TInt)(m_comEnd); nBytes = SYMBIAN_ROUNDUPTOMULTIPLE(nBytes, m_poolSize); TInt offset = (TInt)m_comEnd - (TInt)m_buffer; + // The reserved size is not guaranteed to be a multiple of the pool size. + TInt maxBytes = (TInt)m_resEnd - (TInt)m_comEnd; + if (nBytes > maxBytes) + nBytes = maxBytes; TInt ret = m_chunk.Commit(offset, nBytes); if (ret == KErrNone) m_comEnd = (void*)(m_chunk.Base() + m_chunk.Size()); + else + CRASH(); } } -- cgit v0.12