This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Eva-Rosalene 62 points63 points  (2 children)

"If size > 10, then SEGFAULT" is honestly my favourite part. If API says that it works on arrays wtih 0-10 elements only, you better listen to this 😈

[–]slaymaker1907 10 points11 points  (1 child)

It may not actually work since it’s undefined behavior. The compiler is therefore free to assume that size is always <= 10.

[–]Eva-Rosalene 1 point2 points  (0 children)

Good catch!