]> git.ipfire.org Git - thirdparty/ldns.git/commitdiff
bugfix #497: Test for EOF correctly
authorWillem Toorop <willem@nlnetlabs.nl>
Wed, 17 Jul 2013 20:49:00 +0000 (22:49 +0200)
committerWillem Toorop <willem@nlnetlabs.nl>
Wed, 17 Jul 2013 20:49:00 +0000 (22:49 +0200)
Changelog
drill/drill_util.c

index f7a777e9171a494dbe8a6005b1f6e9f56ace2fc0..abbf21f9016aef100112271e9007f14aa7dc5864 100644 (file)
--- a/Changelog
+++ b/Changelog
@@ -1,4 +1,5 @@
 1.6.17
+       * bugfix #497: Properly test for EOF when reading key files with drill.
        * bugfix #504: GPOS RR has three rdata fields. Thanks Jelte Jansen.
        * -u and -U parameter for ldns-read-zone to mark/unmark a RR type
          for printing as unknown type
index db0433e77e1d52240ef7fd1b1fabe8ba0596c336..9cf90a50ff0aa29a38433fde201539cd706bb271 100644 (file)
@@ -17,10 +17,10 @@ static int
 read_line(FILE *input, char *line, size_t len)
 {
        int i;
-       
-       char c;
+       int c;
+
        for (i = 0; i < (int)len-1; i++) {
-               c = (char)getc(input);
+               c = getc(input);
                if (c == EOF) {
                        return -1;
                } else if (c != '\n') {