From: jongfoster <jongfoster@users.sourceforge.net>
Date: Fri, 25 May 2001 22:43:18 +0000 (+0000)
Subject: Fixing minor memory leak and buffer overflow.
X-Git-Tag: v_2_9_9~489
X-Git-Url: http://www.privoxy.org/gitweb/%22https:/developer-manual/man-page/faq/@default-cgi@/diff?a=commitdiff_plain;h=817f8ec235017b941eda0c205971ce0d4c907cea;p=privoxy.git

Fixing minor memory leak and buffer overflow.
---

diff --git a/jcc.c b/jcc.c
index 4a35540f..1376c34e 100644
--- a/jcc.c
+++ b/jcc.c
@@ -1,4 +1,4 @@
-const char jcc_rcs[] = "$Id: jcc.c,v 1.6 2001/05/23 00:13:58 joergs Exp $";
+const char jcc_rcs[] = "$Id: jcc.c,v 1.7 2001/05/25 22:34:30 jongfoster Exp $";
 /*********************************************************************
  *
  * File        :  $Source: /cvsroot/ijbswa/current/jcc.c,v $
@@ -33,6 +33,9 @@ const char jcc_rcs[] = "$Id: jcc.c,v 1.6 2001/05/23 00:13:58 joergs Exp $";
  *
  * Revisions   :
  *    $Log: jcc.c,v $
+ *    Revision 1.7  2001/05/25 22:34:30  jongfoster
+ *    Hard tabs->Spaces
+ *
  *    Revision 1.6  2001/05/23 00:13:58  joergs
  *    AmigaOS support fixed.
  *
@@ -447,13 +450,14 @@ static void chat(struct client_state *csp)
          {
             write_socket(csp->cfd, JBGIF, sizeof(JBGIF)-1);
          }
-         if (tinygif == 1)
+         else if (tinygif == 1)
          {
             write_socket(csp->cfd, BLANKGIF, sizeof(BLANKGIF)-1);
          }
          else if ((tinygif == 3) && (tinygifurl))
          {
-            p = (char *)malloc(strlen(HTTP_REDIRECT_TEMPLATE) + strlen(tinygifurl));
+            freez(p);
+            p = (char *)malloc(sizeof(HTTP_REDIRECT_TEMPLATE) + strlen(tinygifurl));
             sprintf(p, HTTP_REDIRECT_TEMPLATE, tinygifurl);
             write_socket(csp->cfd, p, strlen(p));
          }