Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pstore/ram: Add kmsg hlen zero check to ramoops_pstore_write()
If zero-length header happened in ramoops_write_kmsg_hdr(), that means we will not be able to read back dmesg record later, since it will be treated as invalid header in ramoops_pstore_read(). So we should not execute the following code but return the error. Signed-off-by: Yue Hu <[email protected]> Signed-off-by: Kees Cook <[email protected]>
- Loading branch information