dtgex2: add 2 to iwork length to prevent OOB interaction in Dtgsy2 #907
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This is to fix what seems like a bug, I may be confused however.
Explanation starting from the top/last of the call stack:
Dtgsy2 requires
iworkof lengthm+n+2Dtgsy2 is called from Dtgex2 with arguments
m=n1,n=n2Dtgex2 requires both n1 and n2 to be either 0, 1, or 2.
Dtgex2 declares iwork with length
ldst=4, so that constrains calling Dtgsy2 withm+n+2<=4Dtgexc has a branch (immediately below goto label 20) in which Dtgex2 is called with n1=2 and n2=1
You will notice I added 2 to iwork's length since it is my understanding that both
n1andn2can both be 2, which would mean a required iwork length of 6 in Dtgsy2.Checklist
No need?
DNE.