njh / twolame

MPEG Audio Layer 2 (MP2) encoder
http://www.twolame.org/
GNU Lesser General Public License v2.1
59 stars 34 forks source link

Fix for unsafe alloc in parse_args #68

Closed eblanca closed 7 years ago

eblanca commented 7 years ago

When parsing arguments, some memory needs to be allocated. Now successful allocation is checked before use. This also avoids calling a free on a NULL pointer.