Opened 4 years ago

Closed 3 months 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


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) (11.7 KB ) - added by krb2018 4 years ago.
Crash Report

Download all attachments as: .zip

Change History (5)

by krb2018, 4 years ago

Crash Report

comment:1 by leavengood, 11 months ago

It does look like the logic is wrong here:

if (strcmp(argv[i], "-s") == 0) {
	if (argc >= i + 1
		&& sscanf(argv[i + 1], "%" B_SCNu16, &sshPort) == 1) {

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 pulkomandy, 11 months ago

Summary: Application Crashes when Missing SSH PortApplication Crashes when Missing SSH Port (easy)

comment:3 by dgillman, 3 months ago

Addressing in:

Seems like none of the parameter validation worked as coded. Updated logic for all parameter validation.

comment:4 by waddlesplash, 3 months ago

Milestone: R1R1/beta4
Resolution: fixed
Status: newclosed

Fix was merged in hrev56420

Note: See TracTickets for help on using tickets.