Skip to content

Commit ac1edd4

Browse files
committed
Fix possible buffer overflow in stats filename
1 parent a96b739 commit ac1edd4

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,7 @@ Or just `./run.sh &` which is recommended.
377377
- Add IPC and TCP support
378378
- Add json support
379379
- PID reuse detection (validate process start time to prevent false positives when PIDs are recycled)
380+
- Configurable timeouts (resource sampling interval, stats write interval, process termination timeout)
380381

381382
## :snowman: Author
382383
Eray Öztürk ([@diffstorm](https://github.com/diffstorm))

src/stats.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
#include <unistd.h>
3030

3131
#define STATS_MAGIC ((uint32_t)0xA50FAA55)
32-
#define MAX_FILENAME_LENGTH MAX_APP_NAME_LENGTH
32+
#define MAX_FILENAME_LENGTH (MAX_APP_NAME_LENGTH + 16) // "stats_" + name + ".log" + null
3333

3434
/**
3535
@brief Structure that holds data for each application.

0 commit comments

Comments
 (0)