Skip to content

Commit

Permalink
libkmod: refactor builtin module handling
Browse files Browse the repository at this point in the history
Remove arbitrary limits due to file sizes (INTPR_MAX check). Reduce
amount of system calls by 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.

Improves overall performance as well.

Signed-off-by: Tobias Stoeckmann <[email protected]>
  • Loading branch information
stoeckmann committed Sep 18, 2024
1 parent d05386f commit a90ea5a
Showing 1 changed file with 110 additions and 251 deletions.
Loading

0 comments on commit a90ea5a

Please sign in to comment.