Skip to content

Commit 7607a66

Browse files
committed
fixup! Args.c: don't use hardcoded string buffer lengths
1 parent 979fd09 commit 7607a66

File tree

1 file changed

+2
-2
lines changed
  • nx-X11/programs/Xserver/hw/nxagent

1 file changed

+2
-2
lines changed

nx-X11/programs/Xserver/hw/nxagent/Args.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -652,7 +652,7 @@ int ddxProcessArgument(int argc, char *argv[], int i)
652652
{
653653
strncpy(nxagentWindowName, argv[i], sizeof(nxagentWindowName) - 1);
654654

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

657657
return 2;
658658
}
@@ -2097,7 +2097,7 @@ static int nxagentGetDialogName()
20972097
if (*nxagentSessionId != '\0')
20982098
{
20992099
int length = strlen(nxagentSessionId);
2100-
const char prefix = "NX - ";
2100+
const char prefix[] = "NX - ";
21012101

21022102
strcpy(nxagentDialogName, prefix);
21032103

0 commit comments

Comments
 (0)