summaryrefslogtreecommitdiff
path: root/ethtool-copy.h
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2012-06-14 20:34:35 +0100
committerBen Hutchings <bhutchings@solarflare.com>2012-07-16 23:43:14 +0100
commita983fb79c614fd24ea71370b54fbf864a2f8d42c (patch)
tree3b5511b6195beb427e21919854a6422e7eddd2df /ethtool-copy.h
parent595b66227e6fa4d1558fe94822446d27ebd070bf (diff)
downloadethtool-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 'ethtool-copy.h')
0 files changed, 0 insertions, 0 deletions