mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-11-01 15:08:21 +00:00
setitimer: fix invalid pointer access
This commit is contained in:
@@ -99,10 +99,10 @@ syscallret_t syscall_setitimer(context_t *context, int which, itimerval_t *unew,
|
|||||||
ret.errno = 0;
|
ret.errno = 0;
|
||||||
if (uold) {
|
if (uold) {
|
||||||
itimerval_t tmp;
|
itimerval_t tmp;
|
||||||
uold->interval.s = oldrepeat / 1000000;
|
tmp.interval.s = oldrepeat / 1000000;
|
||||||
uold->interval.us = oldrepeat % 1000000;
|
tmp.interval.us = oldrepeat % 1000000;
|
||||||
uold->value.s = oldremaining / 1000000;
|
tmp.value.s = oldremaining / 1000000;
|
||||||
uold->value.us = oldremaining % 1000000;
|
tmp.value.us = oldremaining % 1000000;
|
||||||
ret.errno = usercopy_touser(uold, &tmp, sizeof(tmp));
|
ret.errno = usercopy_touser(uold, &tmp, sizeof(tmp));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user