Skip to content

Commit

Permalink
Avoid potential out-of-bounds read in ACE_CDR::Fixed::from_string
Browse files Browse the repository at this point in the history
  • Loading branch information
mitza-oci committed Feb 9, 2024
1 parent cca5af5 commit 90258af
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 90258af

Please sign in to comment.