From dd0534adaf2831e6857185aa6580fa44aff19545 Mon Sep 17 00:00:00 2001 From: John Darrington Date: Mon, 11 Jul 2016 20:51:18 +0200 Subject: [PATCH] Logistic Regression syntax generator: replace ds_data with ds_cstr ds_data does not produce a terminating null. So garbage could be appended at the end of the command. Fixes bug #48467 --- src/ui/gui/psppire-dialog-action-logistic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ui/gui/psppire-dialog-action-logistic.c b/src/ui/gui/psppire-dialog-action-logistic.c index 6be5ce44c5..4308d9b349 100644 --- a/src/ui/gui/psppire-dialog-action-logistic.c +++ b/src/ui/gui/psppire-dialog-action-logistic.c @@ -1,5 +1,5 @@ /* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2008, 2010, 2011, 2012 Free Software Foundation + Copyright (C) 2008, 2010, 2011, 2012, 2016 Free Software Foundation This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -203,7 +203,7 @@ generate_syntax (const PsppireDialogAction *a) ds_init_cstr (&opt_str, "\n\t/CRITERIA ="); syntax_gen_pspp (&opt_str, " CUT(%g)", rd->cut_point); syntax_gen_pspp (&opt_str, " ITERATE(%d)", rd->max_iterations); - g_string_append (strx, ds_data (&opt_str)); + g_string_append (strx, ds_cstr (&opt_str)); ds_destroy (&opt_str); if (rd->conf) -- 2.30.2