Revision: 18632
          http://bibdesk.svn.sourceforge.net/bibdesk/?rev=18632&view=rev
Author:   hofman
Date:     2012-05-17 17:24:31 +0000 (Thu, 17 May 2012)
Log Message:
-----------
fix URL leak on Skim PDFD bundle code path

Modified Paths:
--------------
    trunk/bibdesk_vendorsrc/amaxwell/FileView/FVCGColorSpaceDescription.m
    trunk/bibdesk_vendorsrc/amaxwell/FileView/FVCGImageDescription.m
    trunk/bibdesk_vendorsrc/amaxwell/FileView/FVCGImageUtilities.mm
    trunk/bibdesk_vendorsrc/amaxwell/FileView/FVColorMenuView.m
    trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFileView.m
    trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFinderLabel.m

Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVCGColorSpaceDescription.m
===================================================================
--- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVCGColorSpaceDescription.m       
2012-05-17 17:12:48 UTC (rev 18631)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVCGColorSpaceDescription.m       
2012-05-17 17:24:31 UTC (rev 18632)
@@ -101,7 +101,7 @@
             colorSpace = CGColorSpaceCreateDeviceCMYK();
             break;
         default:
-            FVLog(@"Unable to create color space with %d components", 
components);
+            FVLog(@"Unable to create color space with %zd components", 
components);
     }
     return colorSpace;
 }

Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVCGImageDescription.m
===================================================================
--- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVCGImageDescription.m    
2012-05-17 17:12:48 UTC (rev 18631)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVCGImageDescription.m    
2012-05-17 17:24:31 UTC (rev 18632)
@@ -82,7 +82,7 @@
             _bitmapData = CFDataCreateWithBytesNoCopy(CFGetAllocator(self), 
bitmapPtr, bitmapPtrSize, kCFAllocatorNull);
         }
         
-        NSAssert3((size_t)CFDataGetLength(_bitmapData) == _bytesPerRow * 
_height, @"strange data length %d for %@ (should be >= %lu)", 
CFDataGetLength(_bitmapData), _image, (unsigned long)(_bytesPerRow * _height));
+        NSAssert3((size_t)CFDataGetLength(_bitmapData) == _bytesPerRow * 
_height, @"strange data length %ld for %@ (should be >= %lu)", 
CFDataGetLength(_bitmapData), _image, (unsigned long)(_bytesPerRow * _height));
     }
     return self;
 }

Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVCGImageUtilities.mm
===================================================================
--- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVCGImageUtilities.mm     
2012-05-17 17:12:48 UTC (rev 18631)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVCGImageUtilities.mm     
2012-05-17 17:24:31 UTC (rev 18632)
@@ -191,7 +191,7 @@
 
 static void __FVGetPermuteMapToARGB(CGBitmapInfo bitmapInfo, uint8_t 
permuteMap[4])
 {
-    NSUInteger order = bitmapInfo & kCGBitmapByteOrderMask;
+    CGBitmapInfo order = bitmapInfo & kCGBitmapByteOrderMask;
     CGImageAlphaInfo alphaInfo = (CGImageAlphaInfo)(bitmapInfo & 
kCGBitmapAlphaInfoMask);
     
     /*
@@ -379,7 +379,7 @@
         const uint8_t *srcRow = srcBytes + rowBytes * (region.y + rowIndex) + 
region.x * bytesPerSample;
 #if DEBUG
         if ((rowBytes * (region.y + rowIndex) + region.x * bytesPerSample + 
bytesPerSample * region.w) > __FVCGImageGetDataSize(image)) {
-            FVLog(@"image size = %d, tried to copy %d bytes", 
__FVCGImageGetDataSize(image), rowBytes * (region.y + rowIndex) + region.x * 
bytesPerSample + bytesPerSample * region.w);
+            FVLog(@"image size = %ld, tried to copy %ld bytes", 
__FVCGImageGetDataSize(image), (long)(rowBytes * (region.y + rowIndex) + 
region.x * bytesPerSample + bytesPerSample * region.w));
             HALT;
         }
 #endif
@@ -444,7 +444,7 @@
         const uint8_t *srcRow = srcBytes + rowBytes * (region.y + rowIndex) + 
region.x * bytesPerSample;
 #if DEBUG
         if ((rowBytes * (region.y + rowIndex) + region.x * bytesPerSample + 
bytesPerSample * region.w) > __FVCGImageGetDataSize(image)) {
-            FVLog(@"image size = %d, tried to copy %d bytes", 
__FVCGImageGetDataSize(image), rowBytes * (region.y + rowIndex) + region.x * 
bytesPerSample + bytesPerSample * region.w);
+            FVLog(@"image size = %ld, tried to copy %ld bytes", 
__FVCGImageGetDataSize(image), (long)(rowBytes * (region.y + rowIndex) + 
region.x * bytesPerSample + bytesPerSample * region.w));
             HALT;
         }
 #endif
@@ -933,7 +933,7 @@
             NSCParameterAssert(scaledWidth);
             NSCParameterAssert(region.h);
             ret = vImageHorizontalShear_Planar8(planarA[i]->buffer, 
planarB[i]->buffer, 0, 0, offset, 0, filter, 0, SHEAR_OPTIONS);
-            if (kvImageNoError != ret) FVLog(@"vImageHorizontalShear_Planar8 
failed with error %d", ret);
+            if (kvImageNoError != ret) FVLog(@"vImageHorizontalShear_Planar8 
failed with error %ld", ret);
         }
         
         // do vertical shear for all channels, with B as source and A as 
destination
@@ -947,14 +947,14 @@
             NSCParameterAssert(planarB[i]->buffer->width);
             NSCParameterAssert(scaledHeight);
             ret = vImageVerticalShear_Planar8(planarB[i]->buffer, 
planarA[i]->buffer, 0, 0, offset, 0, filter, 0, SHEAR_OPTIONS);
-            if (kvImageNoError != ret) FVLog(@"vImageVerticalShear_Planar8 
failed with error %d", ret);
+            if (kvImageNoError != ret) FVLog(@"vImageVerticalShear_Planar8 
failed with error %ld", ret);
         }
         
         // premultiply alpha in place if it wasn't previously premultiplied (A 
is now the source)
         if (alphaInfo != kCGImageAlphaPremultipliedFirst && alphaInfo != 
kCGImageAlphaPremultipliedLast) {
             for (i = 1; i < 4 && kvImageNoError == ret; i++)
                 ret = vImagePremultiplyData_Planar8(planarA[i]->buffer, 
planarA[0]->buffer, planarA[i]->buffer, DEFAULT_OPTIONS);
-            if (kvImageNoError != ret) FVLog(@"vImagePremultiplyData_Planar8 
failed with error %d", ret);
+            if (kvImageNoError != ret) FVLog(@"vImagePremultiplyData_Planar8 
failed with error %ld", ret);
         }    
         
         // now convert to a mesh format, using the appropriate column buffer 
as destination
@@ -963,7 +963,7 @@
         imageBuffer->buffer->width = planarA[0]->buffer->width;
         imageBuffer->buffer->height = planarA[0]->buffer->height;
         ret = __FVConvertPlanar8To8888Host(planarTilesA, imageBuffer->buffer);
-        if (kvImageNoError != ret) FVLog(@"__FVConvertPlanar8To8888Host failed 
with error %d", ret);        
+        if (kvImageNoError != ret) FVLog(@"__FVConvertPlanar8To8888Host failed 
with error %ld", ret);        
         
         regionColumnIndex++;
         
@@ -1031,7 +1031,7 @@
     [interleavedImageBuffer release];
     
     if (kvImageNoError != ret)
-        FVLog(@"%s: error %d scaling image to %ld x %ld pixels", __func__, 
ret, ssize_t(desiredSize.width), ssize_t(desiredSize.height));
+        FVLog(@"%s: error %ld scaling image to %ld x %ld pixels", __func__, 
ret, ssize_t(desiredSize.width), ssize_t(desiredSize.height));
     
     return image; 
 }

Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVColorMenuView.m
===================================================================
--- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVColorMenuView.m 2012-05-17 
17:12:48 UTC (rev 18631)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVColorMenuView.m 2012-05-17 
17:24:31 UTC (rev 18632)
@@ -418,7 +418,7 @@
         cell = [self cellAtRow:_boxedRow column:_boxedColumn];
     
     // Finder uses curly quotes around the name, and displays nothing for the 
X item
-    return 0 == [cell tag] ? @"" : [NSString stringWithFormat:@"%C%@%C", 
0x201C, [FVFinderLabel localizedNameForLabel:[cell tag]], 0x201D];
+    return 0 == [cell tag] ? @"" : [NSString stringWithFormat:@"%C%@%C", 
(unichar)0x201C, [FVFinderLabel localizedNameForLabel:[cell tag]], 
(unichar)0x201D];
 }
 
 @end

Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFileView.m
===================================================================
--- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFileView.m      2012-05-17 
17:12:48 UTC (rev 18631)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFileView.m      2012-05-17 
17:24:31 UTC (rev 18632)
@@ -3778,7 +3778,7 @@
 {
     // Sender tag corresponds to the Finder label integer
     NSInteger label = [sender tag];
-    FVAPIAssert1(label >=0 && label <= 7, @"invalid label %d (must be between 
0 and 7)", label);
+    FVAPIAssert1(label >=0 && label <= 7, @"invalid label %ld (must be between 
0 and 7)", (long)label);
     
     NSArray *selectedURLs = [self _selectedURLs];
     NSUInteger i, iMax = [selectedURLs count];

Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFinderLabel.m
===================================================================
--- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFinderLabel.m   2012-05-17 
17:12:48 UTC (rev 18631)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFinderLabel.m   2012-05-17 
17:24:31 UTC (rev 18632)
@@ -223,7 +223,7 @@
 
 + (NSString *)localizedNameForLabel:(NSInteger)label
 {
-    FVAPIAssert1(label <= 7, @"Invalid Finder label %d (must be in the range 
0--7)", label);
+    FVAPIAssert1(label <= 7, @"Invalid Finder label %ld (must be in the range 
0--7)", (long)label);
     NSString *name = [self _preferenceNameForLabel:label];
     NSBundle *bundle = [NSBundle bundleForClass:[FVFinderLabel self]];
     if (nil == name) {
@@ -364,7 +364,7 @@
 
 + (void)drawFinderLabel:(NSUInteger)label inRect:(CGRect)rect 
ofContext:(CGContextRef)context flipped:(BOOL)isFlipped roundEnds:(BOOL)flag;
 {
-    FVAPIAssert1(label <= 7, @"Invalid Finder label %d (must be in the range 
0--7)", label);
+    FVAPIAssert1(label <= 7, @"Invalid Finder label %ld (must be in the range 
0--7)", (long)label);
     
     CGLayerRef layerToDraw = NULL;
     
@@ -434,7 +434,7 @@
 {
     FSRef fileRef;
     
-    FVAPIAssert1(label <= 7, @"Invalid Finder label %d (must be in the range 
0--7)", label);
+    FVAPIAssert1(label <= 7, @"Invalid Finder label %ld (must be in the range 
0--7)", (long)label);
         
     if ([aURL isFileURL] && CFURLGetFSRef((CFURLRef)aURL, &fileRef)) {
 

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit

Reply via email to