summaryrefslogtreecommitdiffstats
path: root/crypto/heimdal/appl/push/push.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/heimdal/appl/push/push.c')
-rw-r--r--crypto/heimdal/appl/push/push.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/crypto/heimdal/appl/push/push.c b/crypto/heimdal/appl/push/push.c
index 2e6f8b8..87a0be2 100644
--- a/crypto/heimdal/appl/push/push.c
+++ b/crypto/heimdal/appl/push/push.c
@@ -32,7 +32,7 @@
*/
#include "push_locl.h"
-RCSID("$Id: push.c,v 1.47.2.1 2004/06/21 10:54:46 lha Exp $");
+RCSID("$Id: push.c 14850 2005-04-19 18:00:17Z lha $");
#ifdef KRB4
static int use_v4 = -1;
@@ -268,11 +268,13 @@ doit(int s,
now = time(NULL);
from_line_length = snprintf (from_line, sizeof(from_line),
"From %s %s", "push", ctime(&now));
+ if (from_line_length < 0 || from_line_length > sizeof(from_line))
+ errx (1, "snprintf failed");
out_len = snprintf (out_buf, sizeof(out_buf),
"USER %s\r\nPASS hej\r\nSTAT\r\n",
user);
- if (out_len < 0)
+ if (out_len < 0 || out_len > sizeof(out_buf))
errx (1, "snprintf failed");
if (net_write (s, out_buf, out_len) != out_len)
err (1, "write");
@@ -490,7 +492,7 @@ doit(int s,
else if(state == DELE)
out_len = snprintf (out_buf, sizeof(out_buf),
"DELE %u\r\n", ++asked_deleted);
- if (out_len < 0)
+ if (out_len < 0 || out_len > sizeof(out_buf))
errx (1, "snprintf failed");
if (net_write (s, out_buf, out_len) != out_len)
err (1, "write");
OpenPOWER on IntegriCloud