avutil/avstring: Fix bug and undefined behavior in av_strncasecmp()
authorMichael Niedermayer <michael@niedermayer.cc>
Mon, 15 Apr 2019 22:09:38 +0000 (00:09 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Wed, 24 Apr 2019 15:05:02 +0000 (17:05 +0200)
commit6f0e9a863466bfcbd75ee15d4d8a6aad2a5126a4
tree40719c4f05e685157225d9b76ab7e09331b2c5f8
parent18a567c369d74af5ef651b07c4c5615f5598616b
avutil/avstring: Fix bug and undefined behavior in av_strncasecmp()

The function in case of n=0 would read more bytes than 0.
The end pointer could be beyond the allocated space, which
is undefined.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavutil/avstring.c