mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
coverity: 324943: confirm get_random worked
In normal systems this doesn't have a way to fail. But check it for consistency.
This commit is contained in:
parent
aec2bdec2f
commit
491f0f6068
1 changed files with 4 additions and 1 deletions
|
@ -1016,7 +1016,10 @@ lws_http_multipart_headers(struct lws *wsi, uint8_t *p)
|
|||
char buf[10], arg[48];
|
||||
int n;
|
||||
|
||||
lws_get_random(wsi->a.context, (uint8_t *)buf, sizeof(buf));
|
||||
if (lws_get_random(wsi->a.context, (uint8_t *)buf, sizeof(buf)) !=
|
||||
sizeof(buf))
|
||||
return NULL;
|
||||
|
||||
lws_b64_encode_string(buf, sizeof(buf),
|
||||
wsi->http.multipart_boundary,
|
||||
sizeof(wsi->http.multipart_boundary));
|
||||
|
|
Loading…
Add table
Reference in a new issue