mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-09 17:38:00 +00:00
x11_get_auth_from_authfile: correct MAX_RECORD_SIZE.
I reset this to a very small value during testing, because my real .Xauthority file is not absurdly enormous, so this was the easiest way to check the algorithm that periodically moves everything up the buffer. Then that test found and fixed a bug, and of course my temporary test value of MAX_RECORD_SIZE got swept up in the 'git commit -a --amend', and pushed with the rest of the refactoring, and I didn't notice until today.
This commit is contained in:
parent
accb6931ce
commit
22d2c72101
10
x11fwd.c
10
x11fwd.c
@ -450,7 +450,15 @@ void x11_get_auth_from_authfile(struct X11Display *disp,
|
||||
int displaynum;
|
||||
int ideal_match = FALSE;
|
||||
char *ourhostname;
|
||||
const size_t MAX_RECORD_SIZE = 0x80, BUF_SIZE = 2 * MAX_RECORD_SIZE;
|
||||
|
||||
/* A maximally sized (wildly implausible) .Xauthority record
|
||||
* consists of a 16-bit integer to start with, then four strings,
|
||||
* each of which has a 16-bit length field followed by that many
|
||||
* bytes of data (i.e. up to 0xFFFF bytes). */
|
||||
const size_t MAX_RECORD_SIZE = 2 + 4 * (2+0xFFFF);
|
||||
|
||||
/* We'll want a buffer of twice that size (see below). */
|
||||
const size_t BUF_SIZE = 2 * MAX_RECORD_SIZE;
|
||||
|
||||
/*
|
||||
* Normally we should look for precisely the details specified in
|
||||
|
Loading…
Reference in New Issue
Block a user