>
> > > In reply to your other mail, not every image triggers the issue.
> > > Could you try this one: http://www.roklein.de/new_theory_logo.jpg
> > > It is 7155 bytes large.
> >
> > oddly, i reproduced using the jpeg you provided.
> > i'll take a closer look at it tonight. thanks for the details.
>
> just note, the issue doesn't show up with my jpeg on older OpenBSD
> versions I tested (5.9, 5.8, 5.5).
>
> It might be a corner case overlooked by the current libtls code; 5.9
> still used libssl.
Yes, it's using libtls and evbuffer_tls(came from syslogd).
I did some tests and I think this hangs with jpeg >=4k and <=15k,
other image sizes not triggers the issue.
..weird
could you try this diff? meanwhile i'll dig a bit more.
thanks,
diff --git a/evbuffer_tls.c b/evbuffer_tls.c
index 1fec73e..28faea8 100644
--- a/evbuffer_tls.c
+++ b/evbuffer_tls.c
@@ -314,7 +314,7 @@ evtls_read(struct evbuffer *buf, int fd, int howmuch,
struct tls *ctx)
n = EVBUFFER_MAX_READ;
}
if (howmuch < 0 || howmuch > n)
- howmuch = n;
+ howmuch = n << 2;
/* If we don't have FIONREAD, we might waste some space here */
if (evbuffer_expand(buf, howmuch) == -1)