-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Labels
Description
I have identified these issues through static auditing and would like to provide a brief report. Considering this is a test tool, the impact of not fixing them may be minimal, but they are still worth noting:
1.Using sprintf without length checking may lead to buffer overflow.
https://github.com/linux-test-project/ltp/blob/master/lib/tst_tmpdir.c#L186
2.Missing fclose(f) in the return path causes resource leaks.
https://github.com/linux-test-project/ltp/blob/master/lib/safe_file_ops.c#L146
https://github.com/linux-test-project/ltp/blob/master/lib/safe_file_ops.c#L153
https://github.com/linux-test-project/ltp/blob/master/lib/safe_file_ops.c#L274