[tor-commits] [stegotorus/master] fixed pdfSteg so that client no longer receives an extra char
zwol at torproject.org
zwol at torproject.org
Fri Jul 20 23:17:06 UTC 2012
commit 9a9cde1295e9ea0855e6227898542ffdfce71743
Author: Steven Cheung <cheung at csl.sri.com>
Date: Mon Nov 7 21:05:37 2011 +0000
fixed pdfSteg so that client no longer receives an extra char
git-svn-id: svn+ssh://spartan.csl.sri.com/svn/private/DEFIANCE@130 a58ff0ac-194c-e011-a152-003048836090
---
src/steg/pdfSteg.c | 8 +-------
1 files changed, 1 insertions(+), 7 deletions(-)
diff --git a/src/steg/pdfSteg.c b/src/steg/pdfSteg.c
index 4a91e55..81efdf4 100644
--- a/src/steg/pdfSteg.c
+++ b/src/steg/pdfSteg.c
@@ -126,7 +126,7 @@ removeDelimiter(char *inbuf, int inbuflen, char *outbuf, int outbuflen,
outbuf[cnt++] = delimiter1; ibp++;
} else { // end-of-data pattern detected
*endFlag = 1;
- break;
+ return cnt;
}
}
}
@@ -490,12 +490,6 @@ x_http2_handle_client_PDF_receive(steg_t *s, conn_t *conn, struct evbuffer *dest
log_debug("CLIENT unwrapped data of length %d:", outbuflen);
- // debugging
- // buf_dump((unsigned char *)outbuf, outbuflen, stderr);
- // ***** not sure why there is an extra char at the end of outbuf
- outbuflen--;
-
-
if (evbuffer_add(dest, outbuf, outbuflen)) {
log_warn("CLIENT ERROR: evbuffer_add to dest fails\n");
return RECV_BAD;
More information about the tor-commits
mailing list