mirror of
https://github.com/openbabel/openbabel.git
synced 2026-08-09 04:28:11 -05:00
Fix fuzz bug - check for 0 or negative bond (tb)
Signed-off-by: Geoff Hutchison <geoff.hutchison@gmail.com>
This commit is contained in:
+1
-1
@@ -628,7 +628,7 @@ namespace OpenBabel {
|
||||
|
||||
int TSingleBond::getValence() {
|
||||
int result=0;
|
||||
if (this->tb <=NBONDTYPES) result=bondValence[this->tb-1];
|
||||
if (this->tb >= 1 && this->tb <= NBONDTYPES) result=bondValence[this->tb-1];
|
||||
return result;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user