projects
/
paraslash.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b349010
)
populate_user_list(): Use correct buffer size.
author
Andre Noll
<maan@systemlinux.org>
Thu, 22 Oct 2009 20:50:58 +0000
(22:50 +0200)
committer
Andre Noll
<maan@systemlinux.org>
Thu, 22 Oct 2009 20:50:58 +0000
(22:50 +0200)
"line" is defined as a 255 byte buffer. Use sizeof(line) rather than MAXLINE in the call
to para_fgets().
This is not a real bug though as MAXLINE happens to be 255 as well.
user_list.c
patch
|
blob
|
history
diff --git
a/user_list.c
b/user_list.c
index 63bfdfc259878402f3f70c2a5c62be5d5fa96ce9..f5aabc0979fa8d1feb1e60722cfd00451d5dfe1a 100644
(file)
--- a/
user_list.c
+++ b/
user_list.c
@@
-39,7
+39,7
@@
static void populate_user_list(char *user_list_file)
struct user *u;
RSA *rsa;
- ret = para_fgets(line,
MAXLINE
, file_ptr);
+ ret = para_fgets(line,
sizeof(line)
, file_ptr);
if (ret <= 0)
break;
if (sscanf(line,"%200s %200s %200s %200s", w, n, k, p) < 3)