diff --git a/keygen/keygen.c b/keygen/keygen.c index dd56b70..1c9726f 100644 --- a/keygen/keygen.c +++ b/keygen/keygen.c @@ -175,7 +175,7 @@ char *get_mac() FILE * fp; char *mac = malloc(18* sizeof(char)); fp = fopen("/sys/class/net/ap0/address", "r"); - fgets(mac, 17, fp); + fgets(mac, 18, fp); fclose(fp); return mac; } @@ -183,9 +183,9 @@ char *get_mac() char *get_serial() { FILE * fp; - char *serial = malloc(21* sizeof(char)); + char *serial = malloc(33* sizeof(char)); fp = fopen("/etc/serial", "r"); - fgets(serial, 20, fp); + fgets(serial, 33, fp); return serial; }