From: Carlos Garcia Campos Date: Sun, 6 Apr 2008 09:30:06 +0000 (+0000) Subject: Fix a crash when printing a range that doesn't specify the start or end X-Git-Tag: EVINCE_2_22_1~3 X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=commitdiff_plain;h=c8966c0d0cc708f6828b0cb1b379e6813b72b1c3;p=evince.git Fix a crash when printing a range that doesn't specify the start or end 2008-04-06 Carlos Garcia Campos * shell/ev-jobs.c: (ev_job_print_get_page_list): Fix a crash when printing a range that doesn't specify the start or end page. Fixes bug #524288. svn path=/trunk/; revision=2989 --- diff --git a/ChangeLog b/ChangeLog index a6de9a8a..cbe2adcb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-04-06 Carlos Garcia Campos + + * shell/ev-jobs.c: (ev_job_print_get_page_list): + + Fix a crash when printing a range that doesn't specify the start or + end page. Fixes bug #524288. + 2008-04-02 Carlos Garcia Campos * shell/ev-window.c: (ev_window_cmd_continuous), diff --git a/shell/ev-jobs.c b/shell/ev-jobs.c index d38ef663..f6328af6 100644 --- a/shell/ev-jobs.c +++ b/shell/ev-jobs.c @@ -819,6 +819,11 @@ ev_job_print_get_page_list (EvJobPrint *job, gint rsize; gint start, end; + if (job->ranges[i].start == -1) + job->ranges[i].start = 0; + if (job->ranges[i].end == -1) + job->ranges[i].end = max_page; + if (job->ranges[i].start > max_page) continue;