chmod_extended and fchmod_extended: handle NULL xsecurity argument correctly.

Fixes #247510.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11412
This commit is contained in:
Julian Seward 2010-10-07 15:38:51 +00:00
parent 1a187bd147
commit bee9b6b321

View File

@ -2041,8 +2041,10 @@ PRE(fchmod_extended)
/* DDD: relative to the xnu sources (kauth_copyinfilesec), this
is just way wrong. [The trouble is with the size, which depends on a
non-trival kernel computation] */
PRE_MEM_READ( "fchmod_extended(xsecurity)", ARG5,
sizeof(struct vki_kauth_filesec) );
if (ARG5) {
PRE_MEM_READ( "fchmod_extended(xsecurity)", ARG5,
sizeof(struct vki_kauth_filesec) );
}
}
PRE(chmod_extended)
@ -2061,8 +2063,10 @@ PRE(chmod_extended)
/* DDD: relative to the xnu sources (kauth_copyinfilesec), this
is just way wrong. [The trouble is with the size, which depends on a
non-trival kernel computation] */
PRE_MEM_READ( "chmod_extended(xsecurity)", ARG5,
sizeof(struct vki_kauth_filesec) );
if (ARG5) {
PRE_MEM_READ( "chmod_extended(xsecurity)", ARG5,
sizeof(struct vki_kauth_filesec) );
}
}
PRE(open_extended)