Fix test for NULL arg in svr4_utime() (PR#4418).

This commit is contained in:
pk 1997-11-03 21:33:07 +00:00
parent d64e10645f
commit 78ccc57a52
1 changed files with 2 additions and 2 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: svr4_stat.c,v 1.24 1997/10/20 22:05:18 thorpej Exp $ */ /* $NetBSD: svr4_stat.c,v 1.25 1997/11/03 21:33:07 pk Exp $ */
/* /*
* Copyright (c) 1994 Christos Zoulas * Copyright (c) 1994 Christos Zoulas
@ -697,7 +697,7 @@ svr4_sys_utime(p, v, retval)
SVR4_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path)); SVR4_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
SCARG(&ap, path) = SCARG(uap, path); SCARG(&ap, path) = SCARG(uap, path);
if (SCARG(uap, ubuf) == NULL) { if (SCARG(uap, ubuf) != NULL) {
if ((error = copyin(SCARG(uap, ubuf), &ub, sizeof(ub))) != 0) if ((error = copyin(SCARG(uap, ubuf), &ub, sizeof(ub))) != 0)
return error; return error;
tbuf[0].tv_sec = ub.actime; tbuf[0].tv_sec = ub.actime;