mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 14:11:52 +00:00
pstore: Fix sprintf format specifier in pstore_dump()
We should use sprintf format specifier "%u" instead of "%d" for argument of type 'unsigned int' in pstore_dump(). Signed-off-by: Alex Chen <alex.chen@huawei.com> Reviewed-by: Joseph Qi <joseph.qi@huawei.com> Acked-by: Kees Cook <keescook@chromium.org> Signed-off-by: Tony Luck <tony.luck@intel.com>
This commit is contained in:
parent
9d5438f462
commit
a6b8978c54
@ -301,7 +301,7 @@ static void pstore_dump(struct kmsg_dumper *dumper,
|
||||
|
||||
if (big_oops_buf) {
|
||||
dst = big_oops_buf;
|
||||
hsize = sprintf(dst, "%s#%d Part%d\n", why,
|
||||
hsize = sprintf(dst, "%s#%d Part%u\n", why,
|
||||
oopscount, part);
|
||||
size = big_oops_buf_sz - hsize;
|
||||
|
||||
@ -321,7 +321,7 @@ static void pstore_dump(struct kmsg_dumper *dumper,
|
||||
}
|
||||
} else {
|
||||
dst = psinfo->buf;
|
||||
hsize = sprintf(dst, "%s#%d Part%d\n", why, oopscount,
|
||||
hsize = sprintf(dst, "%s#%d Part%u\n", why, oopscount,
|
||||
part);
|
||||
size = psinfo->bufsize - hsize;
|
||||
dst += hsize;
|
||||
|
Loading…
Reference in New Issue
Block a user