Commit a8d92ded authored by Bernhard Link's avatar Bernhard Link

fix parsing initial server response

parent e8ca96eb
2010-01-05
* fix parsing initial server response
(old bug, but became obvious on big endian with the new code)
2010-01-02 2010-01-02
* fix SelectionNotify (thanks to Peter Collingbourne) * fix SelectionNotify (thanks to Peter Collingbourne)
* show more details of the initial X server response * show more details of the initial X server response
......
new after 1.0.1: new after 1.0.1:
- bugfixes (SelectionNotify, NoOperation) - bugfixes (SelectionNotify, NoOperation, initial server response)
- show more details of the initial X server response - show more details of the initial X server response
new after 1.0.0: new after 1.0.0:
- bugfixes (RenderTrapezoids and server errors) - bugfixes (RenderTrapezoids and server errors)
......
...@@ -1631,13 +1631,13 @@ void parse_server(struct connection *c) { ...@@ -1631,13 +1631,13 @@ void parse_server(struct connection *c) {
} }
if( c->servercount < 8 ) if( c->servercount < 8 )
return; return;
len = serverCARD16(6);
switch( c->serverstate ) { switch( c->serverstate ) {
case s_start: case s_start:
len = serverCARD16(6);
if( c->servercount/4 < 2+len ) if( c->servercount/4 < 2+len )
return; return;
c->serverignore = 8+4*len; c->serverignore = 8+4*len;
cmd = serverCARD16(0); cmd = serverCARD8(0);
switch( cmd ) { switch( cmd ) {
case 0: case 0:
startline(c, TO_CLIENT, " Failed, version is %d:%d reason is '%*s'.\n", startline(c, TO_CLIENT, " Failed, version is %d:%d reason is '%*s'.\n",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment