Skip to content

Conversation

@gourhand
Copy link

See commit commentaries of the two files

gourhand added 3 commits June 11, 2014 18:03
"read() buffer overflow on file /proc/stat"

At the very first read :
- the file is read in a buffer sized with 4096 bytes
- if 4096 is not enough then the buffer i reallocated until the size is sufficient.
- then the right size is memorized in buffersize
Then all other are read with buffersize size with no possible re-allocation.

This behaviour is an issue with files like /proc/stat which can grow with time leading to infinite "read() buffer overflow on file .."

The purpose of the modification is to let the reallocation always possible
Modification done with  ../lib/file.c

"read() buffer overflow on file /proc/stat"

At the very first read :
- the file is read in a buffer sized with 4096 bytes
- if 4096 is not enough then the buffer i reallocated until the size is sufficient.
- then the right size is memorized in buffersize
Then all other are read with buffersize size with no possible re-allocation.

This behaviour is an issue with files like /proc/stat which can grow with time leading to infinite "read() buffer overflow on file .."

The purpose of the modification is to let the reallocation always possible
 Wrong RRD files rights
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant