Heap-based buffer overflow in the yy_get_next_buffer function in Flex before 2.6.1 might allow context-dependent attackers to cause a denial of service or possibly execute arbitrary code via vectors involving num_to_read.
https://security.gentoo.org/glsa/201701-31
https://github.com/westes/flex/commit/a5cbe929ac3255d371e698f62dc256afe7006466
http://www.openwall.com/lists/oss-security/2016/07/26/12