aboutsummaryrefslogtreecommitdiffstats
path: root/xen/xsm
diff options
context:
space:
mode:
authorMachon Gregory <mbgrego@tycho.ncsc.mil>2011-04-04 15:54:45 +0100
committerMachon Gregory <mbgrego@tycho.ncsc.mil>2011-04-04 15:54:45 +0100
commit2bbb3d0fe9149b302b42c98cffe3fbf1aa286548 (patch)
treeb5907c8721b915d15c5486571f0a2084047cc892 /xen/xsm
parent8afc46b70ce39d34cbcde44e017775336fec21d5 (diff)
downloadxen-2bbb3d0fe9149b302b42c98cffe3fbf1aa286548.tar.gz
xen-2bbb3d0fe9149b302b42c98cffe3fbf1aa286548.tar.bz2
xen-2bbb3d0fe9149b302b42c98cffe3fbf1aa286548.zip
xsm: Error code consistency
Signed-off-by: Machon Gregory <mbgrego@tycho.ncsc.mil>
Diffstat (limited to 'xen/xsm')
-rw-r--r--xen/xsm/flask/flask_op.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/xen/xsm/flask/flask_op.c b/xen/xsm/flask/flask_op.c
index 3c66d03e6a..265a3cf3ac 100644
--- a/xen/xsm/flask/flask_op.c
+++ b/xen/xsm/flask/flask_op.c
@@ -485,6 +485,9 @@ static int flask_security_sid(char *buf, uint32_t count)
if ( length < 0 )
goto out;
+ if ( len > count )
+ return -ERANGE;
+
memset(buf, 0, count);
memcpy(buf, context, len);
length = len;