Talk:Data Encryption Standard: Difference between revisions

no edit summary
No edit summary
 
(One intermediate revision by one other user not shown)
Line 9:
I built the C version for an embedded processor. When I ran it there, the decrypted values didn't match the encrypted ones. Also, the third encryption/decryption didn't produce all the expected output.
 
The culprit is that the code as it stands at this writing doesn't check for malloc() returning zero, and this is exactly what was happening. So instead, some of the lowest addresses in data memory got corrupted.
 
(In this development toolchain, unless the programmer explicitly specifies a value for the heap size, only a tiny heap actually gets allocated.)
Line 20:
 
Should I go ahead and make this change to the code here on rosettacode.org? Or can anyone suggest something better?
: Welcome to the community. I guess just go ahead if it is a bug fix and since C is a popular language you are more likely to get feedback. Good luck and have fun.--[[User:Hkdtam|Hkdtam]] ([[User talk:Hkdtam|talk]]) 18:23, 21 April 2020 (UTC)
351

edits