libvncserver icon indicating copy to clipboard operation
libvncserver copied to clipboard

rfbInitClient() does not parse IPv6 addresses correctly

Open bk138 opened this issue 5 years ago • 3 comments

bk138 avatar Jul 17 '20 11:07 bk138

	  char* colon = NULL;
	  size_t colon_count = 0;
	  char *str = argv[i];
	  while(str && *str) {
	      if(*str == ':')
		  ++colon_count;
	      ++str;
	  }

	  if(colon_count > 1) {
	      /* probably IPv6, need [] to parse port */
	      char *closingbracket = strrchr(argv[i],']');
	      if(closingbracket && *(closingbracket+1) == ':')
		  colon = closingbracket+1;
	  } else
	      colon = strrchr(argv[i],':');

bk138 avatar Jul 17 '20 11:07 bk138

Greetings!

Is there any progress on this bug? My open-source project uses libvncclient and I cannot gain access to IPv6 servers - I receive "Unable to assign address" from libvncclient when trying.

Sorry, due to certain circumstances, I'm unable to submit a patch.

Thanks! :+1:

willbprog127 avatar Mar 16 '23 16:03 willbprog127

Hi @willbprog127 this will still take some time if I do it, I'm currently overwhelmed with job-related work.

bk138 avatar Mar 16 '23 17:03 bk138