summaryrefslogtreecommitdiffstats
path: root/x11vnc/sslhelper.c
diff options
context:
space:
mode:
authorrunge <runge>2006-07-18 00:40:00 +0000
committerrunge <runge>2006-07-18 00:40:00 +0000
commit901729e3e04d13d0d7e701c6a6c014f4adc42ce6 (patch)
tree5ccae39a0740461dde0b2875d3b1e8398b6e1357 /x11vnc/sslhelper.c
parent6e2fa292297af38a12ab6a0bac1a2873b2fb289c (diff)
downloadlibtdevnc-901729e3e04d13d0d7e701c6a6c014f4adc42ce6.tar.gz
libtdevnc-901729e3e04d13d0d7e701c6a6c014f4adc42ce6.zip
x11vnc: enable --without-x builds for -rawfb only binaries.
Diffstat (limited to 'x11vnc/sslhelper.c')
-rw-r--r--x11vnc/sslhelper.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/x11vnc/sslhelper.c b/x11vnc/sslhelper.c
index da1496e..5e62df8 100644
--- a/x11vnc/sslhelper.c
+++ b/x11vnc/sslhelper.c
@@ -1543,27 +1543,27 @@ void accept_openssl(int mode) {
* instead of a direct SSL connection.
*/
rfbLog("Handling VNC request via https GET. [%d]\n", getpid());
-/* AUDIT */
if (strstr(buf, "/reverse.proxy")) {
- char *buf;
+ char *buf2;
int n, ptr;
SSL_write(ssl, reply, strlen(reply));
- buf = (char *) calloc((8192+1), 1);
+ buf2 = (char *) calloc((8192+1), 1);
n = 0;
ptr = 0;
while (ptr < 8192) {
- n = SSL_read(ssl, buf + ptr, 1);
+ n = SSL_read(ssl, buf2 + ptr, 1);
if (n > 0) {
ptr += n;
}
- if (db) fprintf(stderr, "buf2: '%s'\n", buf);
+ if (db) fprintf(stderr, "buf2: '%s'\n", buf2);
- if (strstr(buf, "\r\n\r\n")) {
+ if (strstr(buf2, "\r\n\r\n")) {
break;
}
}
+ free(buf2);
}
goto write_cookie;
@@ -1672,6 +1672,7 @@ if (db) fprintf(stderr, "iface: %s\n", iface);
exit(0);
}
+ /* parent here */
if (mode != OPENSSL_INETD) {
close(sock);
@@ -2106,6 +2107,7 @@ static void ssl_xfer(int csock, int s_in, int s_out, int is_https) {
/* used to see if SSL_pending() should be checked: */
check_pending = 0;
+/* AUDIT */
if (c_wr && FD_ISSET(csock, &wr)) {