]> git.baikalelectronics.ru Git - kernel.git/commit
ext4: fix transposition typo in format string
authorRasmus Villemoes <linux@rasmusvillemoes.dk>
Thu, 2 Apr 2015 20:42:43 +0000 (16:42 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 2 Apr 2015 20:42:43 +0000 (16:42 -0400)
commitddcb7d94162986eb13c2c633f7875113c5ab72b2
tree0c323f1f223e615516930e8a802c5f9b7a0d3dd7
parentc11b5de23d055241c9ff88d225e09de2da1a4efb
ext4: fix transposition typo in format string

According to C99, %*.s means the same as %*.0s, in other words, print as
many spaces as the field width argument says and effectively ignore the
string argument. That is certainly not what was meant here. The kernel's
printf implementation, however, treats it as if the . was not there,
i.e. as %*s. I don't know if de->name is nul-terminated or not, but in
any case I'm guessing the intention was to use de->name_len as precision
instead of field width.

[ Note: this is debugging code which is commented out, so this is not
  security issue; a developer would have to explicitly enable
  INLINE_DIR_DEBUG before this would be an issue. ]

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/inline.c