From 11d11524f6ef21347059123eb9dd693b604b0f52 Mon Sep 17 00:00:00 2001 From: Geoff Hutchison Date: Tue, 19 May 2026 11:28:56 -0400 Subject: [PATCH] Fix fuzz bug - check for 0 or negative bond (tb) Signed-off-by: Geoff Hutchison --- src/mcdlutil.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mcdlutil.cpp b/src/mcdlutil.cpp index 9dbd1cdd4..82823c056 100644 --- a/src/mcdlutil.cpp +++ b/src/mcdlutil.cpp @@ -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; };