[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#271098: marked as done (ttylog leaks memory, unused code)

Your message dated Sun, 27 Jul 2008 07:17:06 +0000
with message-id <E1KN0V8-0003c8-Hb@ries.debian.org>
and subject line Bug#271098: fixed in ttylog 0.1.c-1
has caused the Debian Bug report #271098,
regarding ttylog leaks memory, unused code
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org

271098: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=271098
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: ttylog
Version: 0.1.a-3

ttylog mallocs 1024 bytes in the del1013() function. It never frees the allocated memory. It also calls time() and locatime() but never uses the return values.

The attached patch removes del1013(), the time() and localtime() calls, and the includes for the time headers.
--- ttylog.c.orig       Fri Sep 10 22:54:29 2004
+++ ttylog.c    Fri Sep 10 23:00:40 2004
@@ -1,11 +1,9 @@
 #include <sys/stat.h>
 #include <termios.h>
-#include <time.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
-#include <sys/time.h>
 #include <sys/types.h>
 #include <fcntl.h>
@@ -19,21 +17,6 @@
 {B300, B1200, B2400, B9600, B19200, B38400, B57600, B115200};
-char *
-del1013 (char *str)
-  short i;
-  char *dummy;
-  dummy = (char *) malloc (1024);
-  dummy[0] = 0;
-  for (i = 0; i < strlen (str); i++)
-    if (str[i] != 10 && str[i] != 13)
-      sprintf (dummy, "%s%c", dummy, str[i]);
-  return dummy;
 main (int argc, char *argv[])
@@ -42,8 +25,6 @@
   int retval, i, j, baud = -1;
   int fd;
   char line[1024], modem_device[512];
-  time_t logdate;
-  struct tm *logdate_s;
   struct termios oldtio, newtio;
@@ -134,10 +115,7 @@
       if (retval)
          fgets (line, 1024, logfile);
-         strcpy (line, del1013 (line));
-         logdate = time (NULL);
-         logdate_s = localtime (&logdate);
-         printf ("%s\n", line);
+         printf ("%s", line);

--- End Message ---
--- Begin Message ---
Source: ttylog
Source-Version: 0.1.c-1

We believe that the bug you reported is fixed in the latest version of
ttylog, which is due to be installed in the Debian FTP archive:

  to pool/main/t/ttylog/ttylog_0.1.c-1.diff.gz
  to pool/main/t/ttylog/ttylog_0.1.c-1.dsc
  to pool/main/t/ttylog/ttylog_0.1.c-1_amd64.deb
  to pool/main/t/ttylog/ttylog_0.1.c.orig.tar.gz

A summary of the changes between this version and the previous one is

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 271098@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
Robert James Clay <jame@rocasa.org> (supplier of updated ttylog package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)

Hash: SHA1

Format: 1.8
Date: Sat, 26 Jul 2008 20:56:58 -0400
Source: ttylog
Binary: ttylog
Architecture: source amd64
Version: 0.1.c-1
Distribution: unstable
Urgency: low
Maintainer: Robert James Clay <jame@rocasa.org>
Changed-By: Robert James Clay <jame@rocasa.org>
 ttylog     - serial port logger
Closes: 203356 267872 271098 280629 358515 438226
 ttylog (0.1.c-1) unstable; urgency=low
   * New Maintainer (closes: #358515)
   * New upstream release:
     - Added support for 4800 baud (Closes: #203356)
     - Remove unneeded printf for flushed option. (Closes: #267872)
     - Change ICRNL to IGNCR for connection setup. (Closes: #280629)
     - Remove del1013() and other unused code (Closes: #271098)
     - Fix nostrip build issue. (Closes: #438226)
   * Set debhelper compatibility level to 5
   * Set Standards Version to 3.8.0
   * Reword description and add Homepage to debian/control.
   * Add debian/watch file.
 ef080d3692106e8cb9ec94aa37ed987b8d2f2fd1 964 ttylog_0.1.c-1.dsc
 6adcad4788b33b3842d638afb02b448360b1ebcc 8153 ttylog_0.1.c.orig.tar.gz
 2b554d80b716f1eea29160bf87af21c0874c34a6 2367 ttylog_0.1.c-1.diff.gz
 517a22b0dd89f0014ae7c47221cbe355db50e643 6322 ttylog_0.1.c-1_amd64.deb
 16d3aaad4b7223f8188c55c8d40da44a808cc59e8062f3c4d052e188acfce83c 964 ttylog_0.1.c-1.dsc
 9a4efe148760c8b260ac9b6ed9ad8aed1283ef14a686de28d27540da20ba8aec 8153 ttylog_0.1.c.orig.tar.gz
 20ff5fba444bde5ca8cee2482b459fe1d0120a259291693e01dbd9772a2d6925 2367 ttylog_0.1.c-1.diff.gz
 855bc16d6f0952670ee4d82f0c06c8645ef4cdefc3dd809d9d3706aa493cc008 6322 ttylog_0.1.c-1_amd64.deb
 320bec9a61854772ca4a66b7fe879eb1 964 utils extra ttylog_0.1.c-1.dsc
 6fce229fa9a262c84dc6279fb0b47b3f 8153 utils extra ttylog_0.1.c.orig.tar.gz
 cfe4cd3b7db242aa3e2394fb9185cf68 2367 utils extra ttylog_0.1.c-1.diff.gz
 876fd746e4009c82697dc46ae35c02b3 6322 utils extra ttylog_0.1.c-1_amd64.deb

Version: GnuPG v1.4.9 (GNU/Linux)


--- End Message ---

Reply to: