The call to ProcessInformationCopyDictionary() in isGrowlRunning is
not checked for a null return, which causes a crash in the subsequent
CFDictionaryGetValue() if the PSN is no longer valid. The way-simple
patch:

--- GrowlApplicationBridge.m    2009-09-28 22:48:27.000000000 -0500
+++ GrowlApplicationBridge.m-NEW        2009-12-15 12:08:21.000000000 -0600
@@ -320,6 +320,9 @@

        while (GetNextProcess(&PSN) == noErr) {
                CFDictionaryRef infoDict = 
ProcessInformationCopyDictionary(&PSN,
kProcessDictionaryIncludeAllInformationMask);
+               if( !infoDict )
+                       continue;
+
                CFStringRef bundleId = CFDictionaryGetValue(infoDict,
kCFBundleIdentifierKey);

                if (bundleId && CFStringCompare(bundleId, CFSTR
("com.Growl.GrowlHelperApp"), 0) == kCFCompareEqualTo) {

Not that this is a critical problem... I've seen only one crash report
in six months of using Growl.

Jim

--

You received this message because you are subscribed to the Google Groups 
"Growl Discuss" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/growldiscuss?hl=en.


Reply via email to