]> granicus.if.org Git - curl/commitdiff
Christopher R. Palmer fixed Curl_base64_encode() to deal with zeroes in the
authorDaniel Stenberg <daniel@haxx.se>
Thu, 13 Feb 2003 18:30:10 +0000 (18:30 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 13 Feb 2003 18:30:10 +0000 (18:30 +0000)
data to encode.

lib/base64.c

index 9706c74fbe38a9fd5908517d94479f5b6ea20a1e..0f461eabd4f5c59e7e25c6d19db6bde8c4ec85a8 100644 (file)
@@ -135,7 +135,7 @@ int Curl_base64_encode(const void *inp, int insize, char **outptr)
 
   while(insize > 0) {
     for (i = inputparts = 0; i < 3; i++) { 
-      if(*indata) {
+      if(insize > 0) {
         inputparts++;
         ibuf[i] = *indata;
         indata++;