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
whatthecommit: just shoot me
Merge branch 'next' into fix/small-buffer-overflows-5663
adding Changelog entry for #5663

Refs: #5663
Merge branch 'fix/small-buffer-overflows-5663' into next

Fixes #5663