tracefile.c: check that timestamp seconds do not overflow an unsigned int
authorPierre-Marc Fournier <pierre-marc.fournier@polymtl.ca>
Wed, 16 Sep 2009 04:38:24 +0000 (00:38 -0400)
committerPierre-Marc Fournier <pierre-marc.fournier@polymtl.ca>
Wed, 16 Sep 2009 04:39:29 +0000 (00:39 -0400)
If it does, there will be display problems.

ltt/tracefile.c

index 1b6545514f95224fe3e3459299de7f5a93f82487..efb2ca93f36b7c5d0c4ac23b2a8a5af257d6f51b 100644 (file)
@@ -885,6 +885,8 @@ void ltt_tracefile_time_span_get(LttTracefile *tf,
     *end = ltt_time_zero;
   } else
     *end = tf->buffer.end.timestamp;
+
+  g_assert(end->tv_sec <= G_MAXUINT);
 }
 
 struct tracefile_time_span_get_args {
This page took 0.024637 seconds and 4 git commands to generate.