Skip to content

Fixed buffer overrun if ssh username long#6

Open
morganelectronics wants to merge 1 commit intodragino:masterfrom
morganelectronics:master
Open

Fixed buffer overrun if ssh username long#6
morganelectronics wants to merge 1 commit intodragino:masterfrom
morganelectronics:master

Conversation

@morganelectronics
Copy link
Copy Markdown

If the ssh username was larger than 16 chars, the buffer would silently overrun.
Function stncpy does not append a '\0' to the end of strings, so unexpected characters (from the port string) were used on the end of the username.
Protected all the uses of strncpy by appending a '\0' at the end.
Added a specific warning for usernames too long.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant