Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
libkmod: refactor builtin module handling
Remove arbitrary limits due to file sizes (INTPR_MAX check). Reduce amount of system calls by up to 90 % utilizing stream functions. Also make sure that no TOCTOU could ever happen by not iterating through the file twice: First to figure out amount of strings, then parsing them. If the file changes in between, this can lead to memory corruption. Even though more memory allocations might occur due to strbuf usage, performance generally increased by heavy reduction of system calls. Signed-off-by: Tobias Stoeckmann <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Link: #136 Signed-off-by: Lucas De Marchi <[email protected]>
- Loading branch information