aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Mathieson <martin.r.mathieson@googlemail.com>2009-01-08 16:29:15 +0000
committerMartin Mathieson <martin.r.mathieson@googlemail.com>2009-01-08 16:29:15 +0000
commit89c72aba05090a7667b75581bf81350141e83297 (patch)
treef9752b5f6ace1bfc9b0fe52e2f044c33def0c7af
parentb32079575b61c83c271876bc35ede09c3e6924b6 (diff)
Fix a bug where a space character wasn't being written back to save files.
svn path=/trunk/; revision=27198
-rw-r--r--wiretap/catapult_dct2000.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/wiretap/catapult_dct2000.c b/wiretap/catapult_dct2000.c
index bfef5c99bf..88e01a0c1a 100644
--- a/wiretap/catapult_dct2000.c
+++ b/wiretap/catapult_dct2000.c
@@ -391,9 +391,9 @@ gboolean catapult_dct2000_read(wtap *wth, int *err, gchar **err_info _U_,
line_prefix_info = g_malloc(sizeof(line_prefix_info_t));
/* Create and use buffer for contents before time */
- line_prefix_info->before_time = g_malloc(before_time_offset+1);
- g_strlcpy(line_prefix_info->before_time, linebuff, before_time_offset);
- line_prefix_info->before_time[before_time_offset] = '\0';
+ line_prefix_info->before_time = g_malloc(before_time_offset+2);
+ g_strlcpy(line_prefix_info->before_time, linebuff, before_time_offset+1);
+ line_prefix_info->before_time[before_time_offset+1] = '\0';
/* Create and use buffer for contents before time.
Do this only if it doesn't correspond to " l ", which is by far the most
@@ -1131,12 +1131,15 @@ gboolean parse_line(gint line_length, gint *seconds, gint *useconds,
{
return FALSE;
}
+ /* Skip it */
+ n++;
/*********************************************************************/
/* Find and read the timestamp */
/* Now scan to the next digit, which should be the start of the timestamp */
+ /* This will involve skipping " tm " */
for (; !isdigit((guchar)linebuff[n]) && (n < line_length); n++);
if (n >= line_length)
{