summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/vorbisfile.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/vorbisfile.c b/lib/vorbisfile.c
index 831cb39f..6b7bbee0 100644
--- a/lib/vorbisfile.c
+++ b/lib/vorbisfile.c
@@ -264,6 +264,10 @@ static ogg_int64_t _get_prev_page_serial(OggVorbis_File *vf, ogg_int64_t begin,
}
}
}
+ /*We started from the beginning of the stream and found nothing.
+ This should be impossible unless the contents of the stream changed out
+ from under us after we read from it.*/
+ if(!begin&&vf->offset<0)return OV_EBADLINK;
}
/* we're not interested in the page... just the serialno and granpos. */