From: msweet Date: Fri, 7 Aug 2009 22:49:21 +0000 (+0000) Subject: Merge final 1.4.0 (r8761) changes. X-Git-Tag: release-1.6.3~90 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ee6ddad2570bbfe4ac3c3378b8765532b6d7cde5;p=thirdparty%2Fcups.git Merge final 1.4.0 (r8761) changes. git-svn-id: svn+ssh://src.apple.com/svn/cups/easysw/current@1629 a1ca3aef-8c08-0410-bb20-df032aa958be --- diff --git a/CHANGES.txt b/CHANGES.txt index 19e5d889f..ea17aa96c 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,10 +1,16 @@ -CHANGES.txt - 2009-07-14 +CHANGES.txt - 2009-08-07 ------------------------ CHANGES IN CUPS V1.4.0 - Localization updates (STR #3223, STR #3246, STR #3248, STR #3250) - Documentation updates (STR #3225, STR #3230, STR #3242, STR #3260) + - The --with-pdftops configure option did not accept a full path to the + filter (STR #3278) + - The banner filter did not position the back side image correctly + (STR #3277) + - The dnssd backend could crash (STR #3272) + - The 1284 device ID sometimes contained trailing garbage (STR #3266) - The USB backend returned different URIs for some printers than in CUPS 1.3 (STR #3259) - The scheduler did not do local job-hold-until processing for remote diff --git a/backend/dnssd.c b/backend/dnssd.c index 5cdf16083..50c364c5b 100644 --- a/backend/dnssd.c +++ b/backend/dnssd.c @@ -153,8 +153,8 @@ main(int argc, /* I - Number of command-line args */ memset(&action, 0, sizeof(action)); sigemptyset(&action.sa_mask); - action.sa_handler = SIG_IGN; - sigaction(SIGTERM, &action, sigterm_handler); + action.sa_handler = sigterm_handler; + sigaction(SIGTERM, &action, NULL); #else signal(SIGTERM, sigterm_handler); #endif /* HAVE_SIGSET */ diff --git a/backend/ieee1284.c b/backend/ieee1284.c index dfb9c9c70..46499db45 100644 --- a/backend/ieee1284.c +++ b/backend/ieee1284.c @@ -196,12 +196,19 @@ backendGetDeviceID( * and then limit the length to the size of our buffer... */ - if (length > (device_id_size - 2)) + if (length > device_id_size) length = (((unsigned)device_id[1] & 255) << 8) + ((unsigned)device_id[0] & 255); - if (length > (device_id_size - 2)) - length = device_id_size - 2; + if (length > device_id_size) + length = device_id_size; + + /* + * The length field counts the number of bytes in the string + * including the length field itself (2 bytes). + */ + + length -= 2; /* * Copy the device ID text to the beginning of the buffer and diff --git a/backend/usb-libusb.c b/backend/usb-libusb.c index 3cb61e395..d5c6ae5b6 100644 --- a/backend/usb-libusb.c +++ b/backend/usb-libusb.c @@ -418,12 +418,14 @@ get_device_id(usb_printer_t *printer, /* I - Printer */ * and then limit the length to the size of our buffer... */ - if (length > (bufsize - 2)) + if (length > bufsize) length = (((unsigned)buffer[1] & 255) << 8) + ((unsigned)buffer[0] & 255); - if (length > (bufsize - 2)) - length = bufsize - 2; + if (length > bufsize) + length = bufsize; + + length -= 2; /* * Copy the device ID text to the beginning of the buffer and diff --git a/config-scripts/cups-pdf.m4 b/config-scripts/cups-pdf.m4 index 5d71f4d3f..0421aa732 100644 --- a/config-scripts/cups-pdf.m4 +++ b/config-scripts/cups-pdf.m4 @@ -13,7 +13,7 @@ dnl which should have been included with this file. If this file is dnl file is missing or damaged, see the license at "http://www.cups.org/". dnl -AC_ARG_WITH(pdftops, [ --with-pdftops set pdftops filter (gs,pdftops,none), default=pdftops ]) +AC_ARG_WITH(pdftops, [ --with-pdftops set pdftops filter (gs,/path/to/gs,pdftops,/path/to/pdftops,none), default=pdftops ]) PDFTOPS="" CUPS_PDFTOPS="" @@ -47,6 +47,12 @@ case "x$with_pdftops" in fi ;; + x/*/gs) # Use /path/to/gs without any check: + CUPS_GHOSTSCRIPT="$with_pdftops" + AC_DEFINE(HAVE_GHOSTSCRIPT) + PDFTOPS="pdftops" + ;; + xpdftops) AC_PATH_PROG(CUPS_PDFTOPS, pdftops) if test "x$CUPS_PDFTOPS" != x; then @@ -57,6 +63,20 @@ case "x$with_pdftops" in exit 1 fi ;; + + x/*/pdftops) # Use /path/to/pdftops without any check: + CUPS_PDFTOPS="$with_pdftops" + AC_DEFINE(HAVE_PDFTOPS) + PDFTOPS="pdftops" + ;; + + xnone) # Make no pdftops filter if with_pdftops=none: + ;; + + *) # Invalid with_pdftops value: + AC_MSG_ERROR(Invalid with_pdftops value!) + exit 1 + ;; esac AC_DEFINE_UNQUOTED(CUPS_PDFTOPS, "$CUPS_PDFTOPS") diff --git a/filter/bannertops.c b/filter/bannertops.c index 4bd8ced9d..e18c07e09 100644 --- a/filter/bannertops.c +++ b/filter/bannertops.c @@ -593,7 +593,7 @@ write_banner(banner_file_t *banner, /* I - Banner file */ printf("%.1f %.1f translate\n", PageLeft, PageBottom); else printf("%.1f %.1f translate\n", PageWidth - PageRight, - PageLength - PageRight); + PageLength - PageTop); puts("0 setgray"); y = info_top;