Skip to content

Commit

Permalink
fixup! Args.c: don't use hardcoded string buffer lengths
Browse files Browse the repository at this point in the history
  • Loading branch information
uli42 committed Nov 19, 2017
1 parent 979fd09 commit 7607a66
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nx-X11/programs/Xserver/hw/nxagent/Args.c
Original file line number Diff line number Diff line change
Expand Up @@ -652,7 +652,7 @@ int ddxProcessArgument(int argc, char *argv[], int i)
{
strncpy(nxagentWindowName, argv[i], sizeof(nxagentWindowName) - 1);

nxagentWindowName[sizeof(nxagentWindowName)·-·1] = '\0';
nxagentWindowName[sizeof(nxagentWindowName) - 1] = '\0';

return 2;
}
Expand Down Expand Up @@ -2097,7 +2097,7 @@ static int nxagentGetDialogName()
if (*nxagentSessionId != '\0')
{
int length = strlen(nxagentSessionId);
const char prefix = "NX - ";
const char prefix[] = "NX - ";

strcpy(nxagentDialogName, prefix);

Expand Down

0 comments on commit 7607a66

Please sign in to comment.