flacdec: simplify bounds checking in flac_probe()
authorXi Wang <xi.wang@gmail.com>
Fri, 15 Mar 2013 11:11:47 +0000 (07:11 -0400)
committerLuca Barbato <lu_zero@gentoo.org>
Fri, 15 Mar 2013 11:51:57 +0000 (12:51 +0100)
commit8425d693eefbedbb41f91735614d41067695aa37
tree3a68041a248305aa27ecbbce03eeb6248fdaf537
parenteba1ff31304e407db3cefd7532108408f364367b
flacdec: simplify bounds checking in flac_probe()

Simplify `p->buf > p->buf + p->buf_size - 4' as `p->buf_size < 4'.
Avoid a possible out-of-bounds pointer, which is undefined behavior
in C.

CC: libav-stable@libav.org
Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
libavformat/flacdec.c