Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 132623
b: refs/heads/master
c: 4cb912f
h: refs/heads/master
i:
  132621: 727b097
  132619: 98c0749
  132615: 3922c28
  132607: 305e076
v: v3
  • Loading branch information
Eric Paris authored and James Morris committed Feb 13, 2009
1 parent fef6e9c commit 69a2550
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4ba0a8ad63e12a03ae01c039482967cc496b9174
refs/heads/master: 4cb912f1d1447077160ace9ce3b3a10696dd74e5
6 changes: 4 additions & 2 deletions trunk/security/selinux/hooks.c
Original file line number Diff line number Diff line change
Expand Up @@ -1270,12 +1270,13 @@ static int inode_doinit_with_dentry(struct inode *inode, struct dentry *opt_dent
}

len = INITCONTEXTLEN;
context = kmalloc(len, GFP_NOFS);
context = kmalloc(len+1, GFP_NOFS);
if (!context) {
rc = -ENOMEM;
dput(dentry);
goto out_unlock;
}
context[len] = '\0';
rc = inode->i_op->getxattr(dentry, XATTR_NAME_SELINUX,
context, len);
if (rc == -ERANGE) {
Expand All @@ -1288,12 +1289,13 @@ static int inode_doinit_with_dentry(struct inode *inode, struct dentry *opt_dent
}
kfree(context);
len = rc;
context = kmalloc(len, GFP_NOFS);
context = kmalloc(len+1, GFP_NOFS);
if (!context) {
rc = -ENOMEM;
dput(dentry);
goto out_unlock;
}
context[len] = '\0';
rc = inode->i_op->getxattr(dentry,
XATTR_NAME_SELINUX,
context, len);
Expand Down

0 comments on commit 69a2550

Please sign in to comment.