~ubuntu-branches/ubuntu/quantal/foomatic-filters/quantal

« back to all changes in this revision

Viewing changes to spooler.c

  • Committer: Package Import Robot
  • Author(s): Till Kamppeter
  • Date: 2012-03-02 14:25:03 UTC
  • mfrom: (1.2.8)
  • Revision ID: package-import@ubuntu.com-20120302142503-caift1z6jqyshuaj
Tags: 4.0.13-0ubuntu1
* New upstream release
   - Do not use a string buffer limited to 512 characters for the options
     string supplied by CUPS through the fifth command line argument. Some
     PPD files can produce much longer option strings.

Show diffs side-by-side

added added

removed removed

Lines of Context:
249
249
    char cups_user [128];
250
250
    char cups_jobtitle [128];
251
251
    char cups_copies [128];
252
 
    char cups_options [512];
 
252
    int cups_options_len;
 
253
    char *cups_options;
253
254
    char cups_filename [256];
254
255
    char texttopspath[PATH_MAX];
255
256
 
270
271
    strncpy_omit(cups_user, arglist_get(arglist, 1), 128, omit_shellescapes);
271
272
    strncpy_omit(cups_jobtitle, arglist_get(arglist, 2), 128, omit_shellescapes);
272
273
    strncpy_omit(cups_copies, arglist_get(arglist, 3), 128, omit_shellescapes);
273
 
    strncpy_omit(cups_options, arglist_get(arglist, 4), 512, omit_shellescapes);
 
274
 
 
275
    cups_options_len = strlen(arglist_get(arglist, 4));
 
276
    cups_options = malloc(cups_options_len + 1);
 
277
    strncpy_omit(cups_options, arglist_get(arglist, 4), cups_options_len, omit_shellescapes);
274
278
 
275
279
    /* Common job parameters */
276
280
    strcpy(job->id, cups_jobid);
312
316
                    texttopspath, cups_jobid, cups_user, cups_jobtitle, cups_copies, cups_options);
313
317
        }
314
318
    }
 
319
 
 
320
    free(cups_options);
315
321
}
316
322
 
317
323
void init_solaris(list_t *arglist, dstr_t *filelist, jobparams_t *job)