Callsigns 6 characters long where not being null terminated

pull/4/head
Philip Heron 2013-04-11 23:41:07 +01:00
rodzic 31e9848970
commit 17766a8447
1 zmienionych plików z 1 dodań i 1 usunięć

2
main.c
Wyświetl plik

@ -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;