socks using its own buffer instead of data->state.buffer#12788
socks using its own buffer instead of data->state.buffer#12788icing wants to merge 4 commits intocurl:masterfrom
Conversation
That's a generated file... 😬 |
| struct socks_state { | ||
| enum connect_t state; | ||
| ssize_t outstanding; /* send this many bytes more */ | ||
| unsigned char buffer[8*1024]; /* more than enough */ |
There was a problem hiding this comment.
I have a crystal skull next to my dropping candles here in my lair.
As I read the code, one socks packets always seem to be smaller than 1k, but I might be wrong...therefore the assertions.
There was a problem hiding this comment.
I started replacing the fixed buffer with a bufq, but that quickly escalated all over the file and I was not sure if it would be worth it.
There was a problem hiding this comment.
I believe username, password and hostname are all limited to 256 bytes max, so 1K should probably be enough.
|
Line 434 in the original, 435 in your update, references |
remove generated file
Nice catch! Push a fix. |
|
line 288: DEBUGASSERT(READBUFFER_MIN >= 600); This check verifies the the smallest download buffer is big enough. It should now probably check that |
|
I added a #define for the size and a compile time check. |
|
I did #12797 to help us verify that a ~600 byte buffer will work fine, but we can also adjust the size after the initial merge. |
No description provided.