[PATCH] torture/ntlm_auth: read more than 2047 bytes as a line

Bob Campbell bobcampbell at catalyst.net.nz
Tue Jan 24 00:30:48 UTC 2017


That would be a small performance improvement, you're right. I don't
think that the string will actually get too long, but I guess it's
assumptions like those that mess things up.
Attached is a revised patch that only searches the new part of the string.

On 24/01/17 12:28, jim wrote:
> Why not just search 'more' for the newline so you don't keep searching
> the older pieces in the growing string?
>
> On 1/23/2017 4:57 PM, Bob Campbell wrote:
>> Hi again,
>>
>> It seems like the best way to see issues with your own patch is to post
>> it to a mailing list. Here's an updated version of that patch which
>> won't get stuck in a loop if it doesn't find a newline...
>>
>> Thanks,
>> Bob
>>
>>
>> On 24/01/17 10:01, Bob Campbell wrote:
>>> Hi,
>>>
>>> This test would fail on our cloud due to assuming that a line was
>>> always
>>> 2047 bytes or less in length. This patch just repeatedly reads 2047
>>> bytes until it's found a newline character (or until it's reached
>>> the end).
>>>
>>> Please review and push if appropriate.
>>>
>>> Thanks,
>>> Bob
>>>
>
>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-torture-ntlm_auth-do-not-assume-a-line-is-less-than-.patch
Type: text/x-patch
Size: 1459 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20170124/7b94675c/0001-torture-ntlm_auth-do-not-assume-a-line-is-less-than-.bin>


More information about the samba-technical mailing list