News for hackers. Stuff that matters.
Re:OpenSSL 3.0.7 Published by hedora on Tuesday November 01, 2022 @12:35PM (#33423572)
I don't think it is fair to blame the language for this.

Look at the lines above the vulnerability:

  n = n + i / (written_out + 1);
  i %= (written_out + 1);
Whatever buffer manipulation this is doing could be abstracted out into a library. (As studio.h does.)

Also, since written_out probably varies from loop iteration to iteration, what does "n remainder i" even mean?

Also, why don't they increment written_out before doing the arithmetic, and why do they increment i on line 523, when the only intermediate use of it is "i + 1"?

I've written some crappy code in my time, but when things descended into that level of insanity, I either delegated to fuzz tested functions, or at least left a comment.

There are no comments on this comment yet.