}
/**
- * Read one file from SSL
+ * Read one line from SSL
* zero terminates.
* skips "\r\n" (but not copied to buf).
* @param ssl: the SSL connection to read from (blocking).
/* the result is zero terminated for robustness, but we
* do not include that in the BIO len (for binary data) */
len = (size_t)l-1;
- data = strdup(d);
+ data = (char*)malloc(l);
if(data == NULL) {
if(verb) printf("out of memory\n");
return NULL;
}
+ memcpy(data, d, l);
BIO_free(tmp);
} else {
data = read_data_chunk(ssl, len);
/** getopt global, in case header files fail to declare it. */
extern char* optarg;
-/** Main routine for checkconf */
+/** Main routine for unbound-anchor */
int main(int argc, char* argv[])
{
int c;