libsepol: fix unknown magic section number error message

When running hll/pp on some invalid policy module, it can output:

    libsepol.sepol_module_package_read: unknown magic number at section
    1, offset: 251, number: 0x

The last number looks funny and was caused by using "%ux". "u" is not a
prefix like "l", "h", "z"... and "%x" already expects an unsigned
integer (cf. http://man7.org/linux/man-pages/man3/printf.3.html).

Signed-off-by: Nicolas Iooss <nicolas.iooss@m4x.org>
This commit is contained in:
Nicolas Iooss 2016-11-22 23:23:42 +01:00 committed by Stephen Smalley
parent d10725649e
commit 2907caa33c
1 changed files with 1 additions and 1 deletions

View File

@ -627,7 +627,7 @@ int sepol_module_package_read(sepol_module_package_t * mod,
default:
/* unknown section, ignore */
ERR(file->handle,
"unknown magic number at section %u, offset: %zx, number: %ux ",
"unknown magic number at section %u, offset: %zx, number: %x ",
i, offsets[i], le32_to_cpu(buf[0]));
break;
}