ACL: fix fgets wrong buffer size.
This commit is contained in:
parent
cbed35efd3
commit
6a7545e4d4
@ -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);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user