News for hackers. Stuff that matters.
Re:Tell HN: C Experts Panel – Ask us anything about C by mobilemidget on Wednesday April 15, 2020 @04:05AM (#22875565)
Could you add some extra information why this is so helpful or handy to have? Think it will benefit readers that are starting out with C etc.
Re:Tell HN: C Experts Panel – Ask us anything about C by saagarjha on Wednesday April 15, 2020 @04:51AM (#22875749)
In C, dynamically-sized vectors don’t carry around size information with them, often leading to bugs. This struct attempts to keep the two together.
Re:Tell HN: C Experts Panel – Ask us anything about C by GoblinSlayer on Wednesday April 15, 2020 @07:42AM (#22876603)
Memory corruption in sudo password feedback code happened because length and pointer sit as unrelated variables and have to be manipulated by two separate statements every time like some kind of manually inlined function. For comparison putty slice API handles slice as a whole object in a single statement keeping length and pointer consistent.