Fix printing of invalid l_type and l_whence in fcntl/fcntl64 syscalls
* fcntl.c (print_struct_flock64): Explicitly cast l_type and l_whence
fields to unsigned short to avoid potential sign-extension bug when
printing invalid l_type or l_whence fields.
diff --git a/fcntl.c b/fcntl.c
index 59eca9d..e446a1c 100644
--- a/fcntl.c
+++ b/fcntl.c
@@ -43,9 +43,9 @@
print_struct_flock64(const struct_kernel_flock64 *fl, const int getlk)
{
tprints("{l_type=");
- printxval(lockfcmds, fl->l_type, "F_???");
+ printxval(lockfcmds, (unsigned short) fl->l_type, "F_???");
tprints(", l_whence=");
- printxval(whence_codes, fl->l_whence, "SEEK_???");
+ printxval(whence_codes, (unsigned short) fl->l_whence, "SEEK_???");
tprintf(", l_start=%lld, l_len=%lld",
(long long) fl->l_start, (long long) fl->l_len);
if (getlk)