diff
--- a/bytes_chunk_extract.c
+++ b/bytes_chunk_extract.c
@@ -12,6 +12,10 @@
    start = (k - 1) * (file_size / n);
 13   if (initial_read != SIZE_MAX || start < initial_read)
 15       memmove (buf, buf + start, initial_read - start)
+
+--- a/bytes_chunk_extract.c
+++ b/bytes_chunk_extract.c
@@ -12,6 +12,10 @@
    start = (k - 1) * (file_size / n);
 13   if (initial_read != SIZE_MAX || start < initial_read)
 15       memmove (buf, buf + start, initial_read - start)
+
+--- a/bytes_chunk_extract.c
+++ b/bytes_chunk_extract.c
@@ -12,6 +12,11 @@
    start = (k - 1) * (file_size / n);
 13   if (initial_read != SIZE_MAX || start < initial_read)
 15       memmove (buf, buf + start, initial_read - start)
+
+--- a/bytes_chunk_extract.c
+++ b/bytes_chunk_extract.c
@@ -12,6 +12,9 @@
    start = (k - 1) * (file_size / n);
 13   if (initial_read != SIZE_MAX || start < initial_read)
 15       memmove (buf, buf + start, initial_read - start)
+
+--- a/bytes_chunk_extract.c
+++ b/bytes_chunk_extract.c
@@ -12,6 +12,11 @@
    start = (k - 1) * (file_size / n);
 13   if (initial_read != SIZE_MAX || start < initial_read)
 15       memmove (buf, buf + start, initial_read - start)
+    if (start > initial_read)
+        return;
+    memmove (buf, buf + start, initial_read - start);
+
+
 
 