Skip to content
  • Erik de Castro Lopo's avatar
    libFLAC : Put upper bound on number of seek points. · 033af7bf
    Erik de Castro Lopo authored
    Restrict number of seek points to 32768 total and a maximum of two per
    second.
    
    Ten hours of content is 36000 seconds which gives about one seek point
    for every second for those ten hours. Also, having more than two seek
    point per second makes little sense regardless of content length.
    
    Without these restrictions flac-to-flac encoding of a malformed input
    file (eg something generated with http://lcamtuf.coredump.cx/afl/)
    can result in an attempt to generate a stupidly large number of seek
    points and cause an allocation failure.
    033af7bf