Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
6a7545e4
Commit
6a7545e4
authored
Feb 07, 2019
by
antirez
Browse files
ACL: fix fgets wrong buffer size.
parent
cbed35ef
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/acl.c
View file @
6a7545e4
...
@@ -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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment