libFLAC : Put upper bound on number of seek points.
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.
Showing with 9 additions and 0 deletions