|
Agreed, but I didn't want to give the answer away by saying "in an error
situation".
This sample will actually corrupt storage in the "non-error" situation. If
an API "sees" a Bytes Provided value greater than 8 (which qualifies with
this example) then the storage address four bytes beyond the address of the
"blank" is going to be updated to x'00000000' (Bytes Available) when no
error in the API call is detected. So storage is corrupted simply by calling
the API as demonstrated in the example. Assuming the temporaries RPG sets
aside for consts are 16-byte aligned then this corruption would go
undetected (for now and assuming RPG isn't using the other 15 bytes for
"something", which I doubt).
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.