Commit d07facd4 authored by Rémi Duraffort's avatar Rémi Duraffort

vdr: check array index before using it.

parent 23e0cb9f
...@@ -407,8 +407,8 @@ static int Seek( access_t *p_access, uint64_t i_pos ) ...@@ -407,8 +407,8 @@ static int Seek( access_t *p_access, uint64_t i_pos )
/* find correct file */ /* find correct file */
unsigned i_file = 0; unsigned i_file = 0;
while( i_pos >= FILE_SIZE( i_file ) && while( i_file < FILE_COUNT - 1 &&
i_file < FILE_COUNT - 1 ) i_pos >= FILE_SIZE( i_file ) )
{ {
i_pos -= FILE_SIZE( i_file ); i_pos -= FILE_SIZE( i_file );
i_file++; i_file++;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment