Commit 6a7545e4 authored by antirez's avatar antirez
Browse files

ACL: fix fgets wrong buffer size.

parent cbed35ef
...@@ -1105,7 +1105,7 @@ sds ACLLoadFromFile(const char *filename) { ...@@ -1105,7 +1105,7 @@ sds ACLLoadFromFile(const char *filename) {
/* Load the whole file as a single string in memory. */ /* Load the whole file as a single string in memory. */
sds acls = sdsempty(); sds acls = sdsempty();
while(fgets(buf,CONFIG_MAX_LINE+1,fp) != NULL) while(fgets(buf,sizeof(buf),fp) != NULL)
acls = sdscat(acls,buf); acls = sdscat(acls,buf);
fclose(fp); fclose(fp);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment