patch-layer3_c 442 B

123456789101112131415
  1. --- libmad-0.15.1b.orig/layer3.c 2004-01-23 10:41:32.000000000 +0100
  2. +++ libmad-0.15.1b/layer3.c 2013-10-16 10:51:25.000000000 +0200
  3. @@ -2608,6 +2608,12 @@ int mad_layer_III(struct mad_stream *str
  4. next_md_begin = 0;
  5. md_len = si.main_data_begin + frame_space - next_md_begin;
  6. + if (md_len + MAD_BUFFER_GUARD > MAD_BUFFER_MDLEN)
  7. + {
  8. + stream->error = MAD_ERROR_LOSTSYNC;
  9. + stream->sync = 0;
  10. + return -1;
  11. + }
  12. frame_used = 0;