[Swan-commit] Changes to ref refs/heads/main
D. Hugh Redelmeier
hugh at vault.libreswan.fi
Tue Jun 7 07:29:30 EEST 2022
New commits:
commit ee2d529b464f7ec20bcc9356640ccfd8d40d48f0
Author: D. Hugh Redelmeier <hugh at mimosa.com>
Date: Tue Jun 7 00:21:19 2022 -0400
libswan: ttoaddress.c: tweak colon() to make Coverity Scan happy
The induction variable i goes up by steps of two.
Furthermore, sizeof(u.byte) is even.
So the previous condition "i < sizeof(u.byte)"
implied the necessary condition "i <= sizeof(u.byte) - 2"
Coverity Scan doesn't know this and thought an array overrun could happen.
I replaced the first condition with the second to help Coverity Scan (and humans).
More information about the Swan-commit
mailing list