]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
populate_user_list(): Use correct buffer size.
authorAndre Noll <maan@systemlinux.org>
Thu, 22 Oct 2009 20:50:58 +0000 (22:50 +0200)
committerAndre 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

index 63bfdfc259878402f3f70c2a5c62be5d5fa96ce9..f5aabc0979fa8d1feb1e60722cfd00451d5dfe1a 100644 (file)
@@ -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)