Skip to content

Commit

Permalink
Merge pull request #2198 from mitza-oci/cdrfixed
Browse files Browse the repository at this point in the history
Avoid potential out-of-bounds read in ACE_CDR::Fixed::from_string
  • Loading branch information
mitza-oci authored Feb 9, 2024
2 parents f0f11cb + e3d49b9 commit 3eb7c03
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ACE/ace/CDR_Base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -932,7 +932,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)
Expand Down

0 comments on commit 3eb7c03

Please sign in to comment.