2008-05-19 Roland McGrath <roland@redhat.com>
* signal.c (sys_kill): When current personality's wordsize is smaller than native, sign-extend the PID argument from 32 bits. Fixes RH#430585.
This commit is contained in:
parent
9d9540bfe5
commit
4d7ed02fbc
8
signal.c
8
signal.c
@ -1735,7 +1735,13 @@ sys_kill(tcp)
|
||||
struct tcb *tcp;
|
||||
{
|
||||
if (entering(tcp)) {
|
||||
tprintf("%ld, %s", tcp->u_arg[0], signame(tcp->u_arg[1]));
|
||||
/*
|
||||
* Sign-extend a 32-bit value when that's what it is.
|
||||
*/
|
||||
long pid = tcp->u_arg[0];
|
||||
if (personality_wordsize[current_personality] < sizeof pid)
|
||||
pid = (long) (int) pid;
|
||||
tprintf("%ld, %s", pid, signame(tcp->u_arg[1]));
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user