On 2014-01-17 13:48:05, Abdó Roig-Maranges wrote:
> From 922361bab36aef469766806cca12974e442ce99a Mon Sep 17 00:00:00 2001
> From: Abdo Roig-Maranges <abdo.r...@gmail.com>
> Date: Fri, 17 Jan 2014 12:52:05 +0100
> Subject: [PATCH 1/4] fix page range check
> 
> In those cases, page is in the range [1...N], both ends included.
> ---
>  dbus-interface.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/dbus-interface.c b/dbus-interface.c
> index 569d83a..d145106 100644
> --- a/dbus-interface.c
> +++ b/dbus-interface.c
> @@ -255,7 +255,7 @@ handle_method_call(GDBusConnection* UNUSED(connection),
>      g_variant_get(parameters, "(i)", &page);
>  
>      bool ret = true;
> -    if (page < 1 || (unsigned int)page >= number_of_pages) {
> +    if (page < 1 || (unsigned int)page > number_of_pages) {
>        ret = false;
>      } else {
>        page_set(priv->zathura, page - 1);
> @@ -270,7 +270,7 @@ handle_method_call(GDBusConnection* UNUSED(connection),
>      g_variant_get(parameters, "(ia(dddd)a(idddd))", &page, &iter,
>          &secondary_iter);
>  
> -    if (page < 1 || (unsigned int)page >= number_of_pages) {
> +    if (page < 1 || (unsigned int)page > number_of_pages) {
>        GVariant* result = g_variant_new("(b)", false);
>        g_variant_iter_free(iter);
>        g_variant_iter_free(secondary_iter);
> -- 
> 1.8.5.3

Merged and pushed this one.

Regards
-- 
Sebastian Ramacher
_______________________________________________
zathura mailing list
zathura@lists.pwmt.org
http://lists.pwmt.org/mailman/listinfo/zathura

Reply via email to