Skip to content
Snippets Groups Projects
Commit 62edfab7 authored by Johann Dahm's avatar Johann Dahm Committed by David M. Richter
Browse files

Added a test for if ACE was larger than NFS4_MAX_ACESIZE.

parent a903a205
Loading
......@@ -299,7 +299,13 @@ struct nfs4_ace * nfs4_ace_from_string(char *ace_buf, int is_dir)
ace = nfs4_new_ace(is_dir, type, flags, mask,
acl_nfs4_get_whotype(fields[WHO_INDEX]), fields[WHO_INDEX]);
if (ace == NULL) {
fprintf(stderr,"ACE is NULL.\n");
goto out_free;
} else if (12 + strlen(ace->who) > NFS4_MAX_ACESIZE) {
/* ace type,flag,access_mask are each u32 (3 * 4 bytes) */
fprintf(stderr,"ACE is too large.\n");
goto out_free;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment