Reverse Engineering MacOS High Sierra Supplemental Update
cocoaengineering.com
Reverse Engineering MacOS High Sierra Supplemental Update
1–10 of 135 posts
Re: Reverse Engineering MacOS High Sierra Supplemental Update
#2UPDATE:
Maybe I should have stated my last question differently. I meant that in the context of checking that the data is correct, it would be the same as writing the duplicate code from scratch.
Re: Reverse Engineering MacOS High Sierra Supplemental Update
#3Re: Reverse Engineering MacOS High Sierra Supplemental Update
#4 if ((err = SSLHashSHA1.update(&hashCtx, &signedParams)) != 0)
goto fail;
goto fail; /* MISTAKE! THIS LINE SHOULD NOT BE HERE */
if ((err = SSLHashSHA1.final(&hashCtx, &hashOut)) != 0)
goto fail;
History repeats itself in ever stranger ways. While the effects are different, the original mistake can be quite similar.Re: Reverse Engineering MacOS High Sierra Supplemental Update
#5Simple technique for preventing bugs like this: don't copy-paste code. If you find yourself copy-pasting code think twice why you even have to do it (DRY principle) and be aware of the potential consequences. Even if some code has to be duplicate, I am forcing myself to just write it from scratch, exactly for this reason: do you really know that you have updated all your data? And yeah, unit tests would help in spott…
Re: Reverse Engineering MacOS High Sierra Supplemental Update
#6Simple technique for preventing bugs like this: don't copy-paste code. If you find yourself copy-pasting code think twice why you even have to do it (DRY principle) and be aware of the potential consequences. Even if some code has to be duplicate, I am forcing myself to just write it from scratch, exactly for this reason: do you really know that you have updated all your data? And yeah, unit tests would help in spott…
No?
Re: Reverse Engineering MacOS High Sierra Supplemental Update
#7Simple technique for preventing bugs like this: don't copy-paste code. If you find yourself copy-pasting code think twice why you even have to do it (DRY principle) and be aware of the potential consequences. Even if some code has to be duplicate, I am forcing myself to just write it from scratch, exactly for this reason: do you really know that you have updated all your data? And yeah, unit tests would help in spott…
No, as you'd only be specifying the input and output state, e.g. the change of a model's attributes or the correctness of a mathematical calculation. The code that implements the (business) logic of going from input to output state should be part of your application, not the test.
Re: Reverse Engineering MacOS High Sierra Supplemental Update
#8if ((err = SSLHashSHA1.update(&hashCtx, &signedParams)) != 0) goto fail; goto fail; /* MISTAKE! THIS LINE SHOULD NOT BE HERE */ if ((err = SSLHashSHA1.final(&hashCtx, &hashOut)) != 0) goto fail; History repeats itself in ever stranger ways. While the effects are different, the original mistake can be quite similar.
Re: Reverse Engineering MacOS High Sierra Supplemental Update
#9Simple technique for preventing bugs like this: don't copy-paste code. If you find yourself copy-pasting code think twice why you even have to do it (DRY principle) and be aware of the potential consequences. Even if some code has to be duplicate, I am forcing myself to just write it from scratch, exactly for this reason: do you really know that you have updated all your data? And yeah, unit tests would help in spott…
Re: Reverse Engineering MacOS High Sierra Supplemental Update
#10Scary to think that the reveal of all passwords on MacOS shoulders on one person's accidental copy + paste of one line.