News for hackers. Stuff that matters.
Re:The Git source code audit, viewed as a Rust programmer by j4nek on Tuesday January 24, 2023 @03:06PM (#34509455)
thank you for sharing this post. :)

can somebody give an example for the line:

  int len = slen;      // Here if slen is too big, it loops backs to 0
what happens if slen is to big? all bits in len are zero? (sorry for this noob question btw, just started with c programming) :)
Re:The Git source code audit, viewed as a Rust programmer by rhdunn on Tuesday January 24, 2023 @03:39PM (#34509974)
Yes. Imagine you have a 2-bit integer. `11 + 1` in binary is `100`. The last `1` does not fit so only the remaining `00` gets included. The same applies for any N-bit integer.
Re:The Git source code audit, viewed as a Rust programmer by j4nek on Tuesday January 24, 2023 @03:45PM (#34510061)
thank you - got it this way! :)