DeVault: Announcing the Hare programming language
DeVault: Announcing the Hare programming language
Posted May 2, 2022 16:22 UTC (Mon) by ddevault (subscriber, #99589)In reply to: DeVault: Announcing the Hare programming language by wtarreau
Parent article: DeVault: Announcing the Hare programming language
>I.e. if I want to write a variant of base64 output whose max output size I already know based on the input, am I supposed to use concat() between strings for every character or may I just create a string of suitable size and fill the chars a-la "*(p++) = c" since I know what I'm doing?
Here's some sample code that might answer your question:
https://paste.sr.ht/~sircmpwn/ba2f1f110c6d3e0a6e16c496af0...
Try changing the buffer size to 16 and run it again - the runtime will detect the overflow and abort.
