CID:1214237 String not null terminated

This commit is contained in:
Michael Jerris 2014-05-16 14:41:42 +00:00
parent 455ed10e40
commit 65d9cf62c9
1 changed files with 1 additions and 1 deletions

View File

@ -1543,7 +1543,7 @@ static void switch_core_set_serial(void)
close(write_fd);
}
} else {
bytes = read(fd, buf, sizeof(buf));
bytes = read(fd, buf, sizeof(buf) - 1);
close(fd);
}