From: Jaroslav Kysela Date: Mon, 22 Jun 2020 07:02:11 +0000 (+0200) Subject: ucm: fix the possible buffer overflow (substitution) X-Git-Tag: android-x86-8.1-r6~254 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=089bb8762fd59333670e99a0938e65d613679907;p=android-x86%2Fexternal-alsa-lib.git ucm: fix the possible buffer overflow (substitution) Signed-off-by: Jaroslav Kysela --- diff --git a/src/ucm/ucm_subs.c b/src/ucm/ucm_subs.c index e6af5022..293426f2 100644 --- a/src/ucm/ucm_subs.c +++ b/src/ucm/ucm_subs.c @@ -334,7 +334,7 @@ __match2: tmp = strchr(value + idsize, '}'); if (tmp) { rvalsize = tmp - (value + idsize); - if (rvalsize > sizeof(v2)) { + if (rvalsize >= sizeof(v2)) { err = -ENOMEM; goto __error; }