[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-doc-english
Subject: [kde-doc-english] [docs] [Bug 261509] meinproc4: crash with segfault on Mac OS X
From: RJVB <rjvbertin () gmail ! com>
Date: 2014-09-03 13:34:34
Message-ID: bug-261509-2294-cudaus5RkY () http ! bugs ! kde ! org/
[Download RAW message or body]
https://bugs.kde.org/show_bug.cgi?id=261509
--- Comment #11 from RJVB <rjvbertin@gmail.com> ---
(In reply to kde from comment #5)
> Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
> 0 com.apple.CoreFoundation 0x00007fff8a32ae4f CFStringGetLength
> + 15
> 1 libkdecore.5.dylib 0x0000000100e49011
> convert_CFString_to_QString(__CFString const*) + 49
Whether or not the bug is indeed in convert_CFString_to_QString(), it might be
a good idea to protect that function against null CFStringRefs:
QString convert_CFString_to_QString(CFStringRef str) {
if( str ){
CFIndex length = CFStringGetLength(str);
const UniChar *chars = CFStringGetCharactersPtr(str);
if (chars)
return QString(reinterpret_cast<const QChar *>(chars), length);
QVarLengthArray<UniChar> buffer(length);
CFStringGetCharacters(str, CFRangeMake(0, length), buffer.data());
return QString(reinterpret_cast<const QChar *>(buffer.constData()),
length);
}
else{
return QString();
}
}
--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
kde-doc-english mailing list
kde-doc-english@kde.org
https://mail.kde.org/mailman/listinfo/kde-doc-english
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic