mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-10-17 10:59:31 +00:00
This one was not nice at all. When /proc/bus/i2c-* is read, information is put into a kernel buffer, which was declared to be the same size as the final user-space buffer into which it should be copied. Information was copied into the kernel buffer line by line (using sprintf). If the buffer is smaller than the whole /proc/bus/i2c-*, only part of the file was copied. But if the buffer did not break on a line-break, the sprintf wrote beyond the kernel buffer. With devastating results. Solution: make the kernel buffer a little longer, so that a single additional line would fit into it. git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@431 7894878c-1315-0410-8ee3-d5d059ff63e0