From 674653ffac7d75e8d2aa03683e0f8ee9f38fe0d1 Mon Sep 17 00:00:00 2001 From: Josh Coalson Date: Thu, 22 Mar 2001 23:56:07 +0000 Subject: [PATCH] fix bug where pos could move to before the beginning of the file --- src/libFLAC/file_decoder.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/libFLAC/file_decoder.c b/src/libFLAC/file_decoder.c index 80e96b71..54d4b233 100644 --- a/src/libFLAC/file_decoder.c +++ b/src/libFLAC/file_decoder.c @@ -453,6 +453,8 @@ bool seek_to_absolute_sample_(FLAC__FileDecoder *decoder, long filesize, uint64 } if(pos < l) pos = l; + if(pos < 0) + pos = 0; last_frame_sample = this_frame_sample; } } -- 2.34.1