commit | a3b2c8c7aa1ca860edcf0b0afa371d9eb2269c3c | [log] [tgz] |
---|---|---|
author | Mathias Krause <minipli@googlemail.com> | Fri May 31 23:24:29 2013 +0200 |
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | Mon Jun 03 13:55:02 2013 -0700 |
tree | 45f73dde89f44a0dd67e26859effd3cbe90286d8 | |
parent | 3a76e5e09fbb51e756b4e732e3e65446f4984cf5 [diff] |
debugfs: write_file_bool() - ensure strtobool() operates on valid data In case, userland writes an empty string to a bool debugfs file, buf[] will still be uninitialized when being passed to strtobool() making the outcome of that function purely random. Fix this by always zero-terminating the buffer. Signed-off-by: Mathias Krause <minipli@googlemail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>