Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 83751
b: refs/heads/master
c: 3cdeed2
h: refs/heads/master
i:
  83749: bcc3591
  83747: d8b0376
  83743: 6083148
v: v3
  • Loading branch information
Adrian Bunk authored and Linus Torvalds committed Feb 7, 2008
1 parent 60f72f9 commit efb942e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 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: 8f1466ff0a6e81653e9bb0d9247495bf4e9db7e2
refs/heads/master: 3cdeed2986b09fcc77b4812ca10dbc057e4e5f8c
18 changes: 8 additions & 10 deletions trunk/kernel/cgroup.c
Original file line number Diff line number Diff line change
Expand Up @@ -1355,16 +1355,14 @@ static ssize_t cgroup_common_file_write(struct cgroup *cgrp,
if (nbytes && (buffer[nbytes-1] == '\n')) {
buffer[nbytes-1] = 0;
}
if (nbytes < sizeof(root->release_agent_path)) {
/* We never write anything other than '\0'
* into the last char of release_agent_path,
* so it always remains a NUL-terminated
* string */
strncpy(root->release_agent_path, buffer, nbytes);
root->release_agent_path[nbytes] = 0;
} else {
retval = -ENOSPC;
}

/* We never write anything other than '\0'
* into the last char of release_agent_path,
* so it always remains a NUL-terminated
* string */
strncpy(root->release_agent_path, buffer, nbytes);
root->release_agent_path[nbytes] = 0;

break;
}
default:
Expand Down

0 comments on commit efb942e

Please sign in to comment.