Skip to content

Commit

Permalink
Merge pull request DOCGroup#2196 from mitza-oci/ace6-cdrfixed
Browse files Browse the repository at this point in the history
[ACE 6] Avoid potential out-of-bounds read in ACE_CDR::Fixed::from_string
  • Loading branch information
mitza-oci authored Feb 9, 2024
2 parents a5aa839 + 794ab90 commit 1abcd01
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 @@ -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)
Expand Down

0 comments on commit 1abcd01

Please sign in to comment.