From c8966c0d0cc708f6828b0cb1b379e6813b72b1c3 Mon Sep 17 00:00:00 2001 From: Carlos Garcia Campos Date: Sun, 6 Apr 2008 09:30:06 +0000 Subject: [PATCH] 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 --- ChangeLog | 7 +++++++ shell/ev-jobs.c | 5 +++++ 2 files changed, 12 insertions(+) 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; -- 2.43.5