aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@redhat.com>2007-04-12 14:11:20 -0400
committerKristian Høgsberg <krh@redhat.com>2007-04-12 14:11:20 -0400
commitfb1570efbf4cb8ff4ef45937408cee43874c863a (patch)
tree63c5bcdc50c0ee377ee51f7a0563578534da2027
parent194edcc9cd3ba9d451b644ed45011d9d48e9e72e (diff)
downloadlibraw1394-fb1570efbf4cb8ff4ef45937408cee43874c863a.tar.gz
Wrap receive tail pointer correctly.
-rw-r--r--juju/raw1394-iso.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/juju/raw1394-iso.c b/juju/raw1394-iso.c
index 732727f..06ece9a 100644
--- a/juju/raw1394-iso.c
+++ b/juju/raw1394-iso.c
@@ -176,7 +176,8 @@ flush_recv_packets(raw1394handle_t handle,
handle->iso.tail += handle->iso.max_packet_size;
handle->iso.packet_count--;
- if (handle->iso.tail == handle->iso.buffer_end)
+
+ if (handle->iso.tail + handle->iso.max_packet_size > handle->iso.buffer_end)
handle->iso.tail = handle->iso.buffer;
}