Commit aa94788e authored by Jindrich Makovicka's avatar Jindrich Makovicka

add bounds checking in UDFFileEntry

Some badly mastered DVDs can have set bogus lengths of the Allocation
Descriptors, causing a segfault. This check ensures that the total entry
length does not exceed DVD logical block size before processing the entry.

parent 929660a1
......@@ -443,6 +443,10 @@ static int UDFFileEntry( uint8_t *data, uint8_t *FileType,
L_EA = GETN4( 168 );
L_AD = GETN4( 172 );
if (176 + L_EA + L_AD > DVD_VIDEO_LB_LEN)
return 0;
p = 176 + L_EA;
while( p < 176 + L_EA + L_AD ) {
switch( flags & 0x0007 ) {
......
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