author | Florian Forster <octo@crystal.wlan.home.verplant.org> | |
Tue, 30 Dec 2008 13:44:39 +0000 (14:44 +0100) | ||
committer | Florian Forster <octo@crystal.wlan.home.verplant.org> | |
Tue, 30 Dec 2008 13:44:39 +0000 (14:44 +0100) | ||
commit | 6605ff1a9f15cae891fadc07dd9fd223d6b40560 | |
tree | c1f1e745d6f76d2b6727ee754fd994a03d6ab27c | tree | snapshot |
parent | 52acedd71e96f61d312456396006eff23df8e60a | commit | diff |
network plugin: Fix an invalid size of buffer being used.
When specifying the amount of data to copy, we used `sizeof (buffer)' where
`buffer' is a pointer, giving 4 or 8 bytes, depending on the architecture (and
not depending on the actual buffer size). This results in the `type' being sent
much more often than necessary and sometimes not sending a new type when is was
actually necessary. The only prominent case in the default configuration(s) was
`cpufreq' being used instead of `cpu', though.
While in the process, the global `type' buffer was replaced, because an
appropriate buffer is in `value_list_t' now.
Much thanks to Bruno Prémont for reporting and debugging this issue :)
References: #37
When specifying the amount of data to copy, we used `sizeof (buffer)' where
`buffer' is a pointer, giving 4 or 8 bytes, depending on the architecture (and
not depending on the actual buffer size). This results in the `type' being sent
much more often than necessary and sometimes not sending a new type when is was
actually necessary. The only prominent case in the default configuration(s) was
`cpufreq' being used instead of `cpu', though.
While in the process, the global `type' buffer was replaced, because an
appropriate buffer is in `value_list_t' now.
Much thanks to Bruno Prémont for reporting and debugging this issue :)
References: #37
src/network.c | diff | blob | history |