aboutsummaryrefslogtreecommitdiff
path: root/lib/security.c
diff options
context:
space:
mode:
authorDan Fandrich <dan@coneharvesters.com>2008-11-02 05:01:39 +0000
committerDan Fandrich <dan@coneharvesters.com>2008-11-02 05:01:39 +0000
commit484d549ecef3ee44dff4bbca418b5ace20629502 (patch)
treeb2c366b79b716fd53dd4461b4839666ea8920e79 /lib/security.c
parentd098ab436d458735ed16dfcc6ab43cd4574bac57 (diff)
Marked with TODO comments a number of problems in the Kerberos code detected
while investigating the issue in http://curl.haxx.se/mail/lib-2008-09/0262.html I'm hesitant to fix them because I have no way of testing the result.
Diffstat (limited to 'lib/security.c')
-rw-r--r--lib/security.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/security.c b/lib/security.c
index 3a9642ae4..7f6f3da0a 100644
--- a/lib/security.c
+++ b/lib/security.c
@@ -101,6 +101,7 @@ static const struct Curl_sec_client_mech * const mechs[] = {
NULL
};
+/* TODO: This function isn't actually used anywhere and should be removed */
int
Curl_sec_getc(struct connectdata *conn, FILE *F)
{
@@ -124,6 +125,7 @@ block_read(int fd, void *buf, size_t len)
if(b == 0)
return 0;
else if(b < 0 && (errno == EINTR || errno == EAGAIN))
+ /* TODO: this will busy loop in the EAGAIN case */
continue;
else if(b < 0)
return -1;
@@ -163,6 +165,8 @@ sec_get_data(struct connectdata *conn,
else if(b < 0)
return -1;
len = ntohl(len);
+ /* TODO: This realloc will cause a memory leak in an out of memory
+ * condition */
buf->data = realloc(buf->data, len);
b = buf->data ? block_read(fd, buf->data, len) : -1;
if(b == 0)