Fix size of pointer instead of size of data

This commit is contained in:
Diadlo 2017-04-17 22:41:12 +03:00
commit c760e7e5c5
No known key found for this signature in database
GPG key ID: 5AF9F2E29107C727
2 changed files with 4 additions and 4 deletions

View file

@ -65,7 +65,7 @@ int start_ncp(int s, char *ip, int port, unsigned char options, char *miscptr, F
}
memset(context, 0, sizeof(context));
strncpy(context, login, strlen(login));
strncpy(context + strlen(login), miscptr, sizeof(miscptr) + 1);
strncpy(context + strlen(login), miscptr, sizeof(char) + 1);
login = context;
}
}