tlf-devel
[Top][All Lists]
Advanced

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

[Tlf-devel] fix for crashes with gcc-4.0


From: Joop stakenborg
Subject: [Tlf-devel] fix for crashes with gcc-4.0
Date: Sat, 16 Jul 2005 11:27:33 +0200

Apparently not every prefix line in cty.dat contains a carriage return
plus line feed. This causes tlf to crash when data is written to the
buffer in order to erase these. I am guessing the routine is trying to
write past the buffer length.

In order to fix this, replace the lines:

  buffer[strlen(buffer)-1] = '0';            // remove     \012
  buffer[strlen(buffer)-1] = '0';           // remove      \015

in readctydata.c (around line 90), with:

  char *loc = NULL;
  if ((loc = strchr(buffer, '\r')))
   *loc = '\0';

Regards,
Joop PG4I





reply via email to

[Prev in Thread] Current Thread [Next in Thread]