From: mike Date: Fri, 22 Apr 2011 06:42:29 +0000 (+0000) Subject: Check that we successfully allocate memory for profile name dictionary. X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=46add8e761b47df61d5789968c2ac5e89108ffc3;p=thirdparty%2Fcups.git Check that we successfully allocate memory for profile name dictionary. git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@9709 7a7537e8-13f0-0310-91df-b6672ffda945 --- diff --git a/scheduler/ipp.c b/scheduler/ipp.c index 1145058c12..adc18f2c10 100644 --- a/scheduler/ipp.c +++ b/scheduler/ipp.c @@ -3106,6 +3106,12 @@ apple_init_profile( dict = CFDictionaryCreateMutable(kCFAllocatorDefault, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks); + if (!dict) + { + cupsdLogMessage(CUPSD_LOG_ERROR, "Unable to initialize profile \"%s\".", + iccfile); + return; + } cftext = CFStringCreateWithCString(kCFAllocatorDefault, text, kCFStringEncodingUTF8);