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.
This commit is contained in:
parent
6e381c67fd
commit
a734a97d0e
4
fcntl.c
4
fcntl.c
@ -43,9 +43,9 @@ static void
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user