classic-ui: fix small buffer overflows when checking strlen against MAX_INPUT_BUFFER #5663

Wrong strlen check against MAX_INPUT_BUFFER without
taking '\0' into account fixed.

Refs #5663
Refs #5873
Update Changelog.

Refs #5873