Commit d27bfda1 authored by Philip Carns's avatar Philip Carns

bugfix: terminate strings read from file

parent 44a80528
......@@ -333,7 +333,8 @@ int codes_kernel_helper_bootstrap(char * io_kernel_path, char *
ksize = info.st_size;
/* allocate a buffer for the kernel */
kbuffer = (char *)malloc(sizeof(char) * ksize);
kbuffer = (char *)malloc(sizeof(char) * (ksize+1));
kbuffer[ksize] = '\0';
/* get data from the kernel file */
fd = open(io_kernel_path, O_RDONLY);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment