[virt-tools-list] [PATCH virt-viewer 1/3] app: Return early on empty monitor mapping

Fabiano Fidêncio fabiano at fidencio.org
Mon Feb 15 07:23:18 UTC 2016


On Mon, Feb 15, 2016 at 8:18 AM, Pavel Grunt <pgrunt at redhat.com> wrote:
> Resolves:
> https://bugzilla.redhat.com/show_bug.cgi?id=1304648
> ---
>  src/virt-viewer-app.c | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/src/virt-viewer-app.c b/src/virt-viewer-app.c
> index 653b30c..d4ce06a 100644
> --- a/src/virt-viewer-app.c
> +++ b/src/virt-viewer-app.c
> @@ -382,6 +382,11 @@ virt_viewer_app_parse_monitor_mappings(gchar **mappings, gsize nmappings)
>      int max_display_id = 0;
>      gchar **tokens = NULL;
>
> +    if (nmappings == 0) {
> +        g_warning("Empty monitor-mapping configuration");
> +        goto configerror;
> +    }
> +
>      for (i = 0; i < nmappings; i++) {
>          gchar *endptr = NULL;
>          gint display = 0, monitor = 0;
> --
> 2.5.0
>
> _______________________________________________
> virt-tools-list mailing list
> virt-tools-list at redhat.com
> https://www.redhat.com/mailman/listinfo/virt-tools-list

Acked-by: Fabiano Fidêncio <fidencio at redhat.com>

-- 
Fabiano Fidêncio




More information about the virt-tools-list mailing list