[PATCH] Increase maximum length of http response buffer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* David Woodhouse [10.02.2010 23:09]:
> On Wed, 2010-02-10 at 23:02 +0100, Adam Pi?tyszek wrote:
>>
>> It seems that my company upgraded the CSD trojan on their VPN
>> gateways,
>> becasue I got the following error message from openconnect:
>>
>>   Response body too large for buffer (141075 > 131072)
>>
>> This patch fixes the problem for me, so please consider applying it
>> onto your master branch. 
> 
> Hm, the ideal reaction to such problems is not just to increase the
> limit, but to remove it by doing some kind of realloc()...
> 
> With HTTP chunked encoding or Content-Length, that's actually quite
> simple to cope with. It's only HTTP 1.0 read-till-it-closes that really
> poses a problem, and even then it's not much of one -- you just use
> read() in a loop, reading a fixed size each time and reallocating each
> time. (Or doubling in size each time, perhaps).

I started to work on this tonight. Unfortunately, do not know why the
fetched CSD script cannot be successfully written from the extended
(reallocated) buffer. Error number is "Bad address" as the status of
write() function.

I will send a WIP patch in a separate email.

BR,
/Adam






[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux