demux: stl: fix heap-buffer-overflow
authorShaleen Jain <shaleen.jain95@gmail.com>
Tue, 4 Jul 2017 12:48:54 +0000 (18:18 +0530)
committerThomas Guillem <thomas@gllm.fr>
Wed, 5 Jul 2017 07:20:27 +0000 (09:20 +0200)
commit7033852e1a8292734e1d5800bec864bb5fb24c30
tree001bcc5b271936c34e5fcb2a48d9c69abd4b07ab
parent89b077e2141fb0a7cb76e0b1a5f0785e8d1f9586
demux: stl: fix heap-buffer-overflow

According to the spec, calloc can return a NULL or a unique pointer value if
either of the arguments are 0 depending on the implementation. Add a guard to
prevent allocation by returning an error in the above case.

Signed-off-by: Thomas Guillem <thomas@gllm.fr>
modules/demux/stl.c