diff --git a/pd/src/d_soundfile.c b/pd/src/d_soundfile.c
index 0f0edfe6ccba3d2371be173be1decf203944f1d3..4e1ab4a304f5493631b2d8a48f6f0d92e762315e 100644
--- a/pd/src/d_soundfile.c
+++ b/pd/src/d_soundfile.c
@@ -1267,9 +1267,9 @@ static void soundfiler_read(t_soundfiler *x, t_symbol *s,
         
         poswas = lseek(fd, 0, SEEK_CUR);
         eofis = lseek(fd, 0, SEEK_END);
-        if (poswas < 0 || eofis < 0)
+        if (poswas < 0 || eofis < 0 || eofis < poswas)
         {
-            pd_error(x, "lseek failed");
+            pd_error(x, "lseek failed: %d..%d", poswas, eofis);
             goto done;
         }
         lseek(fd, poswas, SEEK_SET);