-
Notifications
You must be signed in to change notification settings - Fork 101
Closed
Labels
BUGThe issue describes likely incorrect product functionality that likely needs corrected.The issue describes likely incorrect product functionality that likely needs corrected.
Description
For some execution of PRNO, function code 114 (PRNO-TRNG), Hercules crashed due to an invalid memory address.
After some testing, I traced it to these lines:
randbytes = regs->GR( r2 + 1 );
...
randbytes = regs->GR( r1 + 1 );
...
randbytes = regs->GR( r1 + 1 );
...
randbytes = regs->GR( r2 + 1 );
Here, randbytes was loading an unexpectedly large value.
I believe (and the POP confirms) that the length field must be a 32-bit number for AMODE 24/31.
So I changed them to:
randbytes = GR_A(r1 + 1, regs);
or
randbytes = GR_A(r2 + 1, regs);
And It works!
Please consider applying this change. I should provide a patch/pull request, but since it’s a small fix and I don’t quite remember how to, I’m just reporting it here.
Thanks, salva.
Metadata
Metadata
Assignees
Labels
BUGThe issue describes likely incorrect product functionality that likely needs corrected.The issue describes likely incorrect product functionality that likely needs corrected.