[sofia-sip] Fix out-of-bounds write in sres_sofia_update().

This commit is contained in:
Andrey Volk 2020-02-25 02:09:27 +04:00
parent cf0e81c758
commit 72869f13f6
2 changed files with 2 additions and 2 deletions

View File

@ -1 +1 @@
Thu Feb 20 12:12:22 UTC 2020
Mon Feb 24 22:07:30 UTC 2020

View File

@ -224,7 +224,7 @@ static int sres_sofia_update(sres_sofia_t *srs,
if (!(srs->srs_reg + i)->reg_ptr)
break;
}
if (i > N)
if (i >= N)
return su_seterrno(ENOMEM);
reg = srs->srs_reg + i;