From 0e7307260fb18b821409b73cc28acd310631977a Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Thu, 16 Oct 2008 09:16:41 +0000 Subject: [PATCH] - Fix two gcc44 conversion warnings. - Don't bother logging the last five bytes of the 0-chunk. --- jcc.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/jcc.c b/jcc.c index 0d82c1dc..028970f4 100644 --- a/jcc.c +++ b/jcc.c @@ -1,4 +1,4 @@ -const char jcc_rcs[] = "$Id: jcc.c,v 1.194 2008/10/12 18:35:18 fabiankeil Exp $"; +const char jcc_rcs[] = "$Id: jcc.c,v 1.195 2008/10/13 16:04:37 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/jcc.c,v $ @@ -33,6 +33,9 @@ const char jcc_rcs[] = "$Id: jcc.c,v 1.194 2008/10/12 18:35:18 fabiankeil Exp $" * * Revisions : * $Log: jcc.c,v $ + * Revision 1.195 2008/10/13 16:04:37 fabiankeil + * Make sure we don't try to reuse tainted server sockets. + * * Revision 1.194 2008/10/12 18:35:18 fabiankeil * The last commit was a bit too ambitious, apparently the content * length adjustment is only necessary if we aren't buffering. @@ -2636,10 +2639,9 @@ static void chat(struct client_state *csp) { /* XXX: this is a temporary hack */ log_error(LOG_LEVEL_CONNECT, - "Looks like we reached the end of the last chunk: " - "%d %d %d %d %d. We better stop reading.", - buf[len-5], buf[len-4], buf[len-3], buf[len-2], buf[len-1]); - csp->expected_content_length = byte_count + len; + "Looks like we reached the end of the last chunk. " + "We better stop reading."); + csp->expected_content_length = byte_count + (size_t)len; csp->flags |= CSP_FLAG_CONTENT_LENGTH_SET; } } @@ -2948,7 +2950,7 @@ static void chat(struct client_state *csp) */ int header_length = csp->iob->cur - header_start; assert(csp->iob->cur > header_start); - byte_count += len - header_length; + byte_count += (size_t)len - header_length; } /* we're finished with the server's header */ -- 2.39.2