[cups.bugs] [LOW] STR #3068: Reference counting required for MIME type objects

Michael Sweet msweet at apple.com
Tue Jan 20 11:16:09 PST 2009


[STR Closed w/o Resolution]

cupsd will never create two printers with the same name - this is clearly
user error, and something you have to go out of your way to do.  I'd much
rather just add a check in cupsdAddPrinter to return NULL if the printer
already exists.

Moreover, putting the reference count on the end will cause problems - we
allocate only as many bytes as needed for the mime_type_t structure (see
the code in mimeAddType), so you'd need to put the reference count first
(or maybe right after priority) to avoid referencing past the end of the
malloc'd block.  You'll also need the same thing for the filters...

So, thanks for the patch but I don't think we'll be adding reference
counting to mime_type_t or mime_filter_t.

Link: http://www.cups.org/str.php?L3068
Version: 1.4b2
Fix Version: Will Not Fix





More information about the cups mailing list