diff options
author | Ulrich Sibiller <uli42@gmx.de> | 2017-11-24 00:25:25 +0100 |
---|---|---|
committer | Ulrich Sibiller <uli42@gmx.de> | 2018-01-07 01:27:07 +0100 |
commit | 4a345786c6ee3b00882f015a7ac7d1d3215c0b9f (patch) | |
tree | fbae0fcf24922faac3c972c73bc89d624ecb727e /nx-X11/programs/Xserver/hw/nxagent/Dialog.c | |
parent | 5987a7b1af09e97271be3da74d336a64435e759a (diff) | |
download | nx-libs-4a345786c6ee3b00882f015a7ac7d1d3215c0b9f.tar.gz nx-libs-4a345786c6ee3b00882f015a7ac7d1d3215c0b9f.tar.bz2 nx-libs-4a345786c6ee3b00882f015a7ac7d1d3215c0b9f.zip |
Dialog.c,Display.c,NXdixfonts.c: replace strncpy() by snprintf where appropriate
Diffstat (limited to 'nx-X11/programs/Xserver/hw/nxagent/Dialog.c')
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Dialog.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Dialog.c b/nx-X11/programs/Xserver/hw/nxagent/Dialog.c index df6bb1c89..1e394fe38 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Dialog.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Dialog.c @@ -279,16 +279,13 @@ void nxagentLaunchDialog(DialogType dialogType) if (dialogType == DIALOG_FAILED_RECONNECTION) { - strncpy(dialogDisplay, nxagentDisplayName, sizeof(dialogDisplay) - 1); + snprintf(dialogDisplay, sizeof(dialogDisplay), "%s", nxagentDisplayName); } else { - strcpy(dialogDisplay, ":"); - strncat(dialogDisplay, display, sizeof(dialogDisplay) - 1 - 1); + snprintf(dialogDisplay, sizeof(dialogDisplay), ":%s", display); } - dialogDisplay[sizeof(dialogDisplay) - 1] = '\0'; - /* * We don't want to receive SIGCHLD * before we store the child pid. |