Opened 6 years ago
Closed 2 years ago
#14640 closed bug (fixed)
Application Crashes when Missing SSH Port (easy)
Reported by: | krb2018 | Owned by: | mmlr |
---|---|---|---|
Priority: | normal | Milestone: | R1/beta4 |
Component: | Applications/RemoteDesktop | Version: | R1/beta1 |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | All |
Description
Launching RemoteDesktop myuser@myhost -s
from Terminal causes an error that prevents the application from continuing. Crash does not occur unless port isn't supplied for -s, so it might be a problem with input validation. I verified that it doesn't matter whether the host and username are valid, as it happens regardless.
Attachments (1)
Change History (5)
by , 6 years ago
Attachment: | RemoteDesktop-520-debug-17-10-2018-17-24-25.report added |
---|
comment:1 by , 3 years ago
It does look like the logic is wrong here:
https://git.haiku-os.org/haiku/tree/src/apps/remotedesktop/RemoteDesktop.cpp#n96
if (strcmp(argv[i], "-s") == 0) { if (argc >= i + 1 && sscanf(argv[i + 1], "%" B_SCNu16, &sshPort) == 1) { i++; }
It should be if (argc > i + 1
, or it should mimic some of the other blocks which invert the logic and then show the usage if the logic fails.
If no one else makes this small fix I'll make it next time I am doing Haiku development.
comment:2 by , 3 years ago
Summary: | Application Crashes when Missing SSH Port → Application Crashes when Missing SSH Port (easy) |
---|
comment:3 by , 2 years ago
Addressing in: https://review.haiku-os.org/c/haiku/+/5596
Seems like none of the parameter validation worked as coded. Updated logic for all parameter validation.
comment:4 by , 2 years ago
Milestone: | R1 → R1/beta4 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Fix was merged in hrev56420
Crash Report