1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-09 00:00:04 +01:00

fix integer conversions from 64 bit

This commit is contained in:
Kristján Valur Jónsson 2019-10-27 12:55:13 +00:00 committed by Andy Green
parent 2f4316527b
commit 4c224eb64b
3 changed files with 5 additions and 5 deletions

View file

@ -2378,7 +2378,7 @@ lws_h2_ws_handshake(struct lws *wsi)
if (lws_add_http_header_by_token(wsi, WSI_TOKEN_PROTOCOL,
(uint8_t *)lws_hdr_simple_ptr(wsi,
WSI_TOKEN_PROTOCOL),
strlen(lws_hdr_simple_ptr(wsi,
(int)strlen(lws_hdr_simple_ptr(wsi,
WSI_TOKEN_PROTOCOL)),
&p, end))
return -1;

View file

@ -700,10 +700,10 @@ lws_http_serve(struct lws *wsi, char *uri, const char *origin,
if (!wsi->http2_substream)
wsi->sending_chunked = 1;
wsi->protocol_interpret_idx =
wsi->protocol_interpret_idx = (char)(
lws_vhost_name_to_protocol(wsi->vhost,
pvo->value) -
&lws_get_vhost(wsi)->protocols[0];
&lws_get_vhost(wsi)->protocols[0]);
lwsl_debug("want %s interpreted by %s (pcol is %s)\n", path,
wsi->vhost->protocols[

View file

@ -242,7 +242,7 @@ lws_x509_parse_from_pem(struct lws_x509_cert *x509, const void *pem, size_t len)
{
BIO* bio = BIO_new(BIO_s_mem());
BIO_write(bio, pem, len);
BIO_write(bio, pem, (int)len);
x509->cert = PEM_read_bio_X509(bio, NULL, NULL, NULL);
BIO_free(bio);
if (!x509->cert) {
@ -496,7 +496,7 @@ lws_x509_jwk_privkey_pem(struct lws_jwk *jwk, void *pem, size_t len,
const BIGNUM *cmpi;
int n, m, ret = -1;
BIO_write(bio, pem, len);
BIO_write(bio, pem, (int)len);
PEM_read_bio_PrivateKey(bio, &pkey, lws_x509_jwk_privkey_pem_pp_cb,
(void *)passphrase);
BIO_free(bio);