]> andersk Git - openssh.git/commitdiff
- ray@cvs.openbsd.org 2007/02/24 03:30:11
authordtucker <dtucker>
Sun, 25 Feb 2007 09:38:55 +0000 (09:38 +0000)
committerdtucker <dtucker>
Sun, 25 Feb 2007 09:38:55 +0000 (09:38 +0000)
     [moduli.c]
     - strlen returns size_t, not int.
     - Pass full buffer size to fgets.
     OK djm@, millert@, and moritz@.

ChangeLog
moduli.c

index c9c40863d2f14eb127b5413ec4c21e1bd0c60b80..070f8e15d28bc1cde0f1124d7001d80c3cf54ff9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
    - dtucker@cvs.openbsd.org 2007/02/22 12:58:40
      [servconf.c]
      Check activep so Match and GatewayPorts work together; ok markus@
+   - ray@cvs.openbsd.org 2007/02/24 03:30:11
+     [moduli.c]
+     - strlen returns size_t, not int.
+     - Pass full buffer size to fgets.
+     OK djm@, millert@, and moritz@.
 
 20070219
   - (dtucker) OpenBSD CVS Sync
index 44e5ddfc0c03347620cb3998c953ac1092f313e8..8fa545daf090aea41121aadcb295ce3a8c0272a8 100644 (file)
--- a/moduli.c
+++ b/moduli.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: moduli.c,v 1.19 2006/11/06 21:25:28 markus Exp $ */
+/* $OpenBSD: moduli.c,v 1.20 2007/02/24 03:30:11 ray Exp $ */
 /*
  * Copyright 1994 Phil Karn <karn@qualcomm.com>
  * Copyright 1996-1998, 2003 William Allen Simpson <wsimpson@greendragon.com>
@@ -490,11 +490,9 @@ prime_test(FILE *in, FILE *out, u_int32_t trials, u_int32_t generator_wanted)
 
        res = 0;
        lp = xmalloc(QLINESIZE + 1);
-       while (fgets(lp, QLINESIZE, in) != NULL) {
-               int ll = strlen(lp);
-
+       while (fgets(lp, QLINESIZE + 1, in) != NULL) {
                count_in++;
-               if (ll < 14 || *lp == '!' || *lp == '#') {
+               if (strlen(lp) < 14 || *lp == '!' || *lp == '#') {
                        debug2("%10u: comment or short line", count_in);
                        continue;
                }
This page took 1.096349 seconds and 5 git commands to generate.