Re: [PATCH for-8.0] ui/vnc: fix bad address parsing

2023-01-09 Thread Vladimir Sementsov-Ogievskiy
On 12/6/22 23:12, Philippe Mathieu-Daudé wrote: I was pretty sure we had a helper for that, but can't find any. is uri_parse() from util/uri.c appropriate? -- Best regards, Vladimir

Re: [PATCH for-8.0] ui/vnc: fix bad address parsing

2022-12-07 Thread Vladimir Sementsov-Ogievskiy
On 12/6/22 23:12, Philippe Mathieu-Daudé wrote: On 6/12/22 20:23, Vladimir Sementsov-Ogievskiy wrote: IF addrstr == "[" and websocket is true, hostlen becomes 0 and we try to access addrstr[hostlen-1] which is bad idea. Signed-off-by: Vladimir Sementsov-Ogievskiy ---   ui/vnc.c | 2 +-   1 file

Re: [PATCH for-8.0] ui/vnc: fix bad address parsing

2022-12-06 Thread Philippe Mathieu-Daudé
On 6/12/22 20:23, Vladimir Sementsov-Ogievskiy wrote: IF addrstr == "[" and websocket is true, hostlen becomes 0 and we try to access addrstr[hostlen-1] which is bad idea. Signed-off-by: Vladimir Sementsov-Ogievskiy --- ui/vnc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --g

[PATCH for-8.0] ui/vnc: fix bad address parsing

2022-12-06 Thread Vladimir Sementsov-Ogievskiy
IF addrstr == "[" and websocket is true, hostlen becomes 0 and we try to access addrstr[hostlen-1] which is bad idea. Signed-off-by: Vladimir Sementsov-Ogievskiy --- ui/vnc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/vnc.c b/ui/vnc.c index 88f55cbf3c..8830bfe382 1006