Skip to content
Commit e0513d9e authored by Chen Gang's avatar Chen Gang Committed by Benjamin Herrenschmidt
Browse files

arch/powerpc/kernel: Use %12.12s instead of %12s to avoid memory overflow



for tmp_part->header.name:
    it is "Terminating null required only for names < 12 chars".
    so need to limit the %.12s for it in printk

  additional info:

    %12s  limit the width, not for the original string output length
          if name length is more than 12, it still can be fully displayed.
          if name length is less than 12, the ' ' will be filled before name.

    %.12s truly limit the original string output length (precision)

Signed-off-by: default avatarChen Gang <gang.chen@asianux.com>
Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
parent ec67ad82
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment