Callsigns 6 characters long where not being null terminated

This commit is contained in:
Philip Heron 2013-04-11 23:41:07 +01:00
parent 31e9848970
commit 17766a8447
1 changed files with 1 additions and 1 deletions

2
main.c
View File

@ -55,7 +55,7 @@ int main(int argc, char *argv[])
case 'c':
if(strlen(optarg) > 6)
fprintf(stderr, "Warning: callsign is longer than 6 characters.\n");
strncpy(callsign, optarg, 6);
strncpy(callsign, optarg, 7);
break;
case 'i': image_id = atoi(optarg); break;
case 't': droptest = atoi(optarg); break;