From 90258afc7c510ead3ace1e30382bb5ba877610b3 Mon Sep 17 00:00:00 2001 From: Adam Mitz Date: Fri, 9 Feb 2024 15:06:03 +0000 Subject: [PATCH] Avoid potential out-of-bounds read in ACE_CDR::Fixed::from_string --- ACE/ace/CDR_Base.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ACE/ace/CDR_Base.cpp b/ACE/ace/CDR_Base.cpp index b87380ee50746..c307be0e11e5e 100644 --- a/ACE/ace/CDR_Base.cpp +++ b/ACE/ace/CDR_Base.cpp @@ -935,7 +935,7 @@ ACE_CDR::Fixed ACE_CDR::Fixed::from_string (const char *str) ++f.digits_; } - if (!f.scale_ && str[span - f.digits_ - 1] == '.') + if (!f.scale_ && span > f.digits_ && str[span - f.digits_ - 1] == '.') f.scale_ = f.digits_; if (idx >= 0)