4 ms·
Never heard of a serious buffer overflow caused by _constant_ indices. Does it work with AT(arr, i), or only with AT(arr, 10)?
by frabert 3y ago
Never heard of a serious buffer overflow caused by _constant_ indices. Does it work with AT(arr, i), or only with AT(arr, 10)?
- heylemao 3y agoYeap, that's the whole point of it
- frabert 3y agoHuh I misinterpreted the error messages in the example, I thought those were compiler output. This is quite cool then. EDIT: although, it seems like this looses much of its power once you start passing these buffers around to functions that do not use these macros.
- deleted 3y ago[deleted]
- deleted 3y ago[deleted]
- teo_zero 3y ago> this looses much of its power once you start passing these buffers around to functions that do not use these macros. Alas it's even worse: once you pass buffers around to functions, you can't use these macros!
- skullchap 3y ago0.0.2 update is live, and solves this issue. Check for updated README.
- oleganza 3y ago"'Brother,' says he, 'greetings. Didn't I see you in Southern Missouri last summer selling colored sand at half-a-dollar a teaspoonful to put into lamps to keep the oil from exploding?' "'Oil,' says I, 'never explodes. It's the gas that forms that explodes.' But I shakes hands with him, anyway. ... "'Listen,' says I. 'I instruct her to keep her lamp clean and well filled. If she does that it can't burst. And with the sand in it she knows it can't, and she don't worry. — O. Henry, The Man Higher Up
- CyberDildonics 3y agoDid you mean to reply somewhere else? This thread is about about bounds checking arrays in the C programming language.
- pjmlp 3y agoYou definitly didn't understood the message.
- Joker_vD 3y agoBut it's absolutely true though: if only the C programmers right their code very carefully and in specific patterns, the buffer overflows and invalid dereferences won't happen and therefore, won't explode their programs! By the way, only today I have a silver bullet to sell with "runtime safety violations" written on it, anyone willing to buy it?
- CyberDildonics 3y agoIf you did understood it, then explain it so I can understood it too.
- pjmlp 3y agoSomehow doesn't seem worth my time.
- CyberDildonics 3y agoSo it was worth your time to reply twice, but not to explain anything?
- pjmlp 3y agoYes, because I don't expect you to understand anyway and ELI5 would take a bit, much longer than these dumb comments. Hint, someone else got it.