libmicrohttpd
[Top][All Lists]
Advanced

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

Re: [libmicrohttpd] libmicrohttpd running into indefinite loops


From: Alexander Couzens
Subject: Re: [libmicrohttpd] libmicrohttpd running into indefinite loops
Date: Thu, 19 Jan 2017 17:02:37 +0100

On Sat, 26 Nov 2016 15:30:28 +0300
Evgeny Grin <address@hidden> wrote:

> Looks like you are sending 4GiB-1 file on 32bit OS and sendfile failed
> as mmap operations are not supported on such file.
> Fallback to ordinal read()/send() should be fixed in
> b3f1a958ce613f304234ecb6506976db26c117dc.
> Could you retry with latest git version?
Sorry, I couldn't do that, because I'vn't found a way to reproduce
it in the same environment, but I found some part of the problem.

nodogsplash is giving a fd of a directory to libmicrohttpd and lseek()
was used to define the size of the file without checking the return
value resulting in the size = 4GiB-1.

But anyway, mmap on a directory doesn't look like a good idea.

On my working machine a simple test is not going into a indef loop.
Passing a directory resulting in a direct close of the connection (no
headers, no data).

Best
lynxis
-- 
Alexander Couzens

mail: address@hidden
jabber: address@hidden
mobile: +4915123277221
gpg: 390D CF78 8BF9 AA50 4F8F  F1E2 C29E 9DA6 A0DF 8604

Attachment: 0001-simple-test-when-passing-a-directory.patch
Description: Text Data

Attachment: pgpjYTUjq7gUF.pgp
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]