Email or username:

Password:

Forgot your password?
Ariadne Conill ๐Ÿฐ

the nice thing about C is that if you want to shoot yourself in the foot, it will enthusiastically let you do so and then ask for the next appendage to shoot

16 comments
Chris (so far)

@ariadne you need to give it a pointer to the address of the contiguous memory block of appendages though โ€ฆ

NiftyLinks

@ariadne which you can specify in either array or pointer notation.

adb

@ariadne Maybe don't add all the appendages to a linked list first?

Ariadne Conill ๐Ÿฐ

@adb what is a linked list? i just use reallocarray(3) and qsort(3) anymore

adb

@ariadne Losing appendages in a deterministic predictable order has to be worse than a random unexpected disassembly (algorithmically similar to Elon's RUDs, it might seem).

caleb

@ariadne

broke: strlen("Hello World!");

woke: sizeof("Hello World!") - 1;

Ariadne Conill ๐Ÿฐ

@cas ah i see you've been looking at the (wrong) fluentbit CVE fix

caleb

@ariadne uhh what's that?

i needed to deal with a null separated string array and "discovered" this one ๐Ÿ˜…

(have since found a better approach)

DELETED

@ariadne I do appreciate that C just does it.. C++ always makes you ask nicely to shoot yourself in the foot.

Ada Stevenson

@weilawei @ariadne
C++ won't take an appendage. Instead, it will kindly take something less obvious like your adrenal glands :)

StarkRG

@ariadne It won't so much ask as just assume you want it to and do so unless you tell it not to.

veetee

@ariadne conveniently, you can just leave the next appendage right there on the stack!

Go Up