Hi Jan, Thank you for reviewing.
Jan Safranek wrote: >> diff --git a/src/api.c b/src/api.c >> index 237d4e6..9da3ebb 100644 >> --- a/src/api.c >> +++ b/src/api.c >> @@ -479,7 +479,7 @@ static int cgroup_parse_rules(bool cache, uid_t >> muid, gid_t mgid) >> >> newrule->uid = uid; >> newrule->gid = gid; >> - strncpy(newrule->name, user, strlen(user)); >> + strncpy(newrule->username, user, strlen(user)); > > I wonder why there is strncpy(..., strlen(user)) - it actually walks > through 'user' twice, once to compute length and then it's actually > copied. Simple strcpy does the same, doesn't it? That's right, good catch. > I know it's not your bug, the code was already there and it originally > comes from [email protected]. Still, would you mind fixing such nonsense, > probably in another, unrelated patch? It is better to fix it by another patch, because this patch only rename the member "name" in struct cgroup_rule. Would you mind if I fix it by another patch in the next patchset ? Thanks Ken'ichi Ohmichi ------------------------------------------------------------------------------ Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT is a gathering of tech-side developers & brand creativity professionals. Meet the minds behind Google Creative Lab, Visual Complexity, Processing, & iPhoneDevCamp as they present alongside digital heavyweights like Barbarian Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com _______________________________________________ Libcg-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/libcg-devel
