Project

General

Profile

Bug #673 ยป parsers.patch

parsers.patch - Marc Perrudin, 2011-09-04 01:22

View differences:

src/parsers.c 2011-09-04 01:12:29.000000000 +0200
385 385

  
386 386
  plen = (buf[4] << 8) | buf[5];
387 387

  
388
  if(plen + 6 > len || next_startcode != sc)
389
    return 3;
388
  if(plen + 6 > len || next_startcode != sc) {
389
    if ( sc == 445 && next_startcode == 448 && plen + 5 < len ) {
390
      tvhlog(LOG_DEBUG, "parser", "Depacketise: len %i, plen %i",
391
          len, plen);
392
      tvhlog(LOG_DEBUG, "parser", "Depacketise: sc %u, next_startcode %u",
393
          sc, next_startcode);
394
    } else {
395
      return 3;
396
    }
397
  }
390 398

  
391 399
  if(plen + 6 < len)
392 400
    return 1;
    (1-1/1)