aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Hoersken <info@marc-hoersken.de>2012-04-13 13:02:59 +0200
committerDaniel Stenberg <daniel@haxx.se>2012-06-11 19:00:34 +0200
commit78729e76da07c7eda05e63469faaaff7eb6ab80d (patch)
tree7c5ba662c51e2844558a0dfbc4efe9903f3a245d
parentf858bb0d1f989694d562e7fe7818ee7189c18e28 (diff)
schannel: Fixed critical typo in conditions and added buffer length checks
-rw-r--r--lib/curl_schannel.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/curl_schannel.c b/lib/curl_schannel.c
index 3de8e7c01..6bc768219 100644
--- a/lib/curl_schannel.c
+++ b/lib/curl_schannel.c
@@ -336,7 +336,7 @@ schannel_connect_step2(struct connectdata *conn, int sockindex) {
if(sspi_status == SEC_I_CONTINUE_NEEDED || sspi_status == SEC_E_OK) {
for(i = 0; i < 2; i++) {
/* search for handshake tokens that need to be send */
- if(outbuf[i].BufferType = SECBUFFER_TOKEN && outbuf[i].cbBuffer > 0) {
+ if(outbuf[i].BufferType == SECBUFFER_TOKEN && outbuf[i].cbBuffer > 0) {
infof(data, "schannel: sending next handshake data: %d ...\n",
outbuf[i].cbBuffer);
@@ -369,7 +369,7 @@ schannel_connect_step2(struct connectdata *conn, int sockindex) {
}
/* check if there was additional remaining encrypted data */
- if(inbuf[1].BufferType = SECBUFFER_EXTRA) {
+ if(inbuf[1].BufferType == SECBUFFER_EXTRA && inbuf[1].cbBuffer > 0) {
infof(data, "schannel: encrypted data length: %d\n", inbuf[1].cbBuffer);
/* check if the remaining data is less than the total amount
@@ -789,7 +789,7 @@ schannel_recv(struct connectdata *conn, int sockindex,
}
/* check for remaining encrypted data */
- if(inbuf[3].BufferType = SECBUFFER_EXTRA) {
+ if(inbuf[3].BufferType == SECBUFFER_EXTRA && inbuf[3].cbBuffer > 0) {
infof(data, "schannel: encrypted data length: %d\n", inbuf[3].cbBuffer);
/* check if the remaining data is less than the total amount