Fix: consumer snapshot: handle unsigned long overflow
[lttng-tools.git] / src / common / ust-consumer / ust-consumer.c
index baa81d450aae793b084d2450450d0f793b7b9d20..071276042a443297560b734ef4cf276f517aab25 100644 (file)
@@ -1180,7 +1180,7 @@ static int snapshot_channel(uint64_t key, char *path, uint64_t relayd_id,
                                produced_pos, nb_packets_per_stream,
                                stream->max_sb_size);
 
-               while (consumed_pos < produced_pos) {
+               while ((long) (consumed_pos - produced_pos) < 0) {
                        ssize_t read_len;
                        unsigned long len, padded_len;
 
This page took 0.024521 seconds and 4 git commands to generate.