forked from aniani/gmnisrv
Bump client buffer size to BUFSIZ
This commit is contained in:
parent
9bed26b8d9
commit
48f75abcfd
@ -1,5 +1,6 @@
|
||||
#ifndef GMNISRV_SERVER
|
||||
#define GMNISRV_SERVER
|
||||
#include <assert.h>
|
||||
#include <openssl/ssl.h>
|
||||
#include <poll.h>
|
||||
#include <time.h>
|
||||
@ -25,7 +26,8 @@ struct gmnisrv_client {
|
||||
SSL *ssl;
|
||||
BIO *bio, *sbio;
|
||||
|
||||
char buf[GEMINI_MAX_URL + 3];
|
||||
char buf[BUFSIZ];
|
||||
static_assert(BUFSIZ >= GEMINI_MAX_URL + 3);
|
||||
size_t bufix, bufln;
|
||||
|
||||
enum response_state state;
|
||||
|
@ -362,7 +362,6 @@ client_readable(struct gmnisrv_server *server, struct gmnisrv_client *client)
|
||||
return;
|
||||
}
|
||||
|
||||
// XXX: Can buf be statically allocated?
|
||||
int r = BIO_gets(client->bio, client->buf, sizeof(client->buf));
|
||||
if (r <= 0) {
|
||||
r = SSL_get_error(client->ssl, r);
|
||||
|
Loading…
Reference in New Issue
Block a user