20
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
this post was submitted on 24 May 2026
20 points (85.7% liked)
Programming
27108 readers
266 users here now
Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!
Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.
Hope you enjoy the instance!
Rules
Rules
- Follow the programming.dev instance rules
- Keep content related to programming in some way
- If you're posting long videos try to add in some form of tldr for those who don't want to watch videos
Wormhole
Follow the wormhole through a path of communities !webdev@programming.dev
founded 3 years ago
MODERATORS

So I gave the actual code a one minute look (literally).
Picked
src/radicle/util.c, since that was the last file touched.The level of defensive programming doesn't look that good (and I'm trying to be nice here).
Here is an example, and note that I didn't do C in a while:
The two functions above
main()are copy-pasted from that file.Let's zoom in:
Here we're accessing
str[len_str-1]without checkinglen_strfirst.But you might be thinking, maybe
len_strcan't be zero!Let's compile first with the AddressSanitizer enabled:
Now let's see how easily we can have fun:
(The rest of
AddressSanitizeroutput omitted.)Another function from the same file:
Here,
inpis shifted beforeinplength is checked, which doesn't look safe. But my one minute is up, so I didn't dive into the function callers.Pretending C is a good choice in 2026, then not being extra vigilant with defensive programming, is not a good look. I remember myself being more vigilant in my wrappers even when I was a beginner.
This is made worse by the developer repeating literal memes like:
Maybe such an enlightened developer should know that you can bootstrap
rustcfrommrustcusing GCC.Awesome, I think you're the first person to give Cradicle a bit of a code audit. Thank you. I'll check your feedback with a more C-focused programming community to see what others think before passing it onto the dev.
This reminds me of another reason I thought the dev made an interesting choice with C: by using C, we might attract "red team" volunteers to provide scrutiny.