1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-08-05 13:16:13 +03:00

* RSA_decrypt now checks the integrity of the first 11 bytes.

* The size of the output buffer in RSA_decrypt is now checked and cleared.
* get_random now returns an error code
* Various system calls now check the return code to remove gcc warnings.

git-svn-id: svn://svn.code.sf.net/p/axtls/code/trunk@237 9a5d90b5-6617-0410-8a86-bb477d3ed2e3
This commit is contained in:
cameronrich
2014-11-07 00:38:49 +00:00
parent 08b27ee1cb
commit 9ef84f9234
7 changed files with 4939 additions and 4895 deletions

View File

@@ -188,7 +188,12 @@ static void procdirlisting(struct connstruct *cn)
{
snprintf(buf, sizeof(buf), HTTP_VERSION
" 200 OK\nContent-Type: text/html\n\n");
write(cn->networkdesc, buf, strlen(buf));
if (write(cn->networkdesc, buf, strlen(buf)) < 0)
{
printf("procdirlisting: could not write");
TTY_FLUSH();
}
removeconnection(cn);
return;
}
@@ -625,7 +630,13 @@ static void proccgi(struct connstruct *cn)
/* Send POST query data to CGI script */
if ((cn->reqtype == TYPE_POST) && (cn->content_length > 0))
{
write(spipe[1], cn->post_data, cn->content_length);
if (write(spipe[1], cn->post_data, cn->content_length) == -1)
{
printf("[CGI]: could write to pipe");
TTY_FLUSH();
return;
}
close(spipe[0]);
close(spipe[1]);