Sisyphus repositório
Última atualização: 1 outubro 2023 | SRPMs: 18631 | Visitas: 37583710
en ru br
ALT Linux repositórios
S:3.0.1-alt2
5.0: 2.4.5-alt2
4.1: 2.4.5-alt2
4.0: 2.4.5-alt2

Outros repositórios
Upstream:2.4.6

Group :: Edição
RPM: cups-pdf

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs e FR  Repocop 

Patch: cups-pdf-title.patch
Download


--- src/cups-pdf.c.orig	2017-02-27 17:29:16.181652925 -0400
+++ src/cups-pdf.c	2017-02-27 18:02:13.137755216 -0400
@@ -700,6 +700,13 @@
       title[strlen(title)-1]='\0';
       memmove(title, title+1, strlen(title));
     }
+    cut=strchr(title, '\r');
+    if (!cut)
+      cut=strchr(title, '\n');
+    if (cut) {
+      *cut = 0;
+      log_event(CPDEBUG, "removing newlines from title", title);
+    }
   }
   cut=strrchr(title, '/');
   if (cut != NULL) {
@@ -789,11 +796,13 @@
   (void) fputs(buffer, fpdest);
   while (fgets2(buffer, BUFSIZE, fpsrc) != NULL) {
     (void) fputs(buffer, fpdest);
-    if (!is_title && !rec_depth)
+    if (!is_title && !rec_depth) {
+      memset(title, 0, BUFSIZE);
       if (sscanf(buffer, "%%%%Title: %"TBUFSIZE"c", title)==1) {
         log_event(CPDEBUG, "found title in ps code: %s", title);
         is_title=1;
       }
+    }
     if (!strncmp(buffer, "%!", 2)) {
       log_event(CPDEBUG, "found embedded (e)ps code: %s", buffer);
       rec_depth++;
 
projeto & código: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
mantenedor atual: Michael Shigorin
mantenedor da tradução: Fernando Martini aka fmartini © 2009