OpenSSH and the dangers of unused code

22    28 Jan 2016 19:27 by u/svipbo

8 comments

6

Unused code is unreachable code and poses no risks.

This is talking about half-implemented features? I'm not even sure what their point is.

1

I'm thinking they meant "seldom used" code, such as exceptions for rarely encountered errors which become much more frequent if they get a little help from a cracker.

2

Doesn't unused/unreachable code pose a very very very small risk in the case of a buffer overflow or something similar?

1

A good compiler will remove unused code or at least warn you about it.

0

What are some comparably good or bad compilers that will/won't warn you?

1

Most compilers are good compilers these days, you just have to make sure you turn turn on the right options

gcc -Wunreachable-code

In non-compiled languages, a linter will do the same thing.

1

Thank you for sharing.