]> Pileus Git - ~andy/fetchmail/commitdiff
The function from64tobits() in fetchmail-5.0.4 recognizes
authorEric S. Raymond <esr@thyrsus.com>
Fri, 18 Jun 1999 13:47:14 +0000 (13:47 -0000)
committerEric S. Raymond <esr@thyrsus.com>
Fri, 18 Jun 1999 13:47:14 +0000 (13:47 -0000)
end of string as '\r' or '='.  gen_recv() zeros out the
trailing '\n' or '\r', and from64tobits() didn't parse
a challenge string correctly (for me.)

svn path=/trunk/; revision=2506

base64.c

index 2deebc8a5554403a3a2efa41ce0bb02a47b4aae3..1dc533dd003d1b89d12d49bbd151626785d1beaa 100644 (file)
--- a/base64.c
+++ b/base64.c
@@ -90,7 +90,7 @@ int from64tobits(char *out, const char *in)
            }
        }
     } while 
-       (*in != '\r' && digit4 != '=');
+       (*in && *in != '\r' && digit4 != '=');
 
     return (len);
 }