diff options
author | Ben Hutchings <bhutchings@solarflare.com> | 2012-06-14 20:34:35 +0100 |
---|---|---|
committer | Ben Hutchings <bhutchings@solarflare.com> | 2012-07-16 23:43:14 +0100 |
commit | a983fb79c614fd24ea71370b54fbf864a2f8d42c (patch) | |
tree | 3b5511b6195beb427e21919854a6422e7eddd2df /amd8111e.c | |
parent | 595b66227e6fa4d1558fe94822446d27ebd070bf (diff) | |
download | ethtool-a983fb79c614fd24ea71370b54fbf864a2f8d42c.tar.gz |
Don't trust drivers to null-terminate strings
Some drivers have been seen to fill all bytes of
ethtool_drvinfo::fw_version without including a null terminator, which
effectively concatenates the following bytes to the string. We've
already dealt with a similar problem in dump_stats() (commit
7764430a139e4a089127f5616b0d56f497be1036). Try to cover all the
remaining string fields:
- In dump_drvinfo(), limit the length using printf() modifiers
- Add an option to get_stringset() to null-terminate all strings
- Change all callers except dump_stats() to set that option
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Diffstat (limited to 'amd8111e.c')
0 files changed, 0 insertions, 0 deletions