diff options
author | nectar <nectar@FreeBSD.org> | 2002-02-19 15:46:56 +0000 |
---|---|---|
committer | nectar <nectar@FreeBSD.org> | 2002-02-19 15:46:56 +0000 |
commit | 69a91bec14ec3ad49d1c8a82c40a796755f9e4a3 (patch) | |
tree | 85ecf91fd00875cec4b93111d3a8ed9eec9cddfe /crypto/heimdal/appl/push/push.c | |
parent | 8db4cdb3da4228a5d93635e43825e2e8a2f66db7 (diff) | |
download | FreeBSD-src-69a91bec14ec3ad49d1c8a82c40a796755f9e4a3.zip FreeBSD-src-69a91bec14ec3ad49d1c8a82c40a796755f9e4a3.tar.gz |
Import of Heimdal Kerberos from KTH repository circa 2002/02/17.
Diffstat (limited to 'crypto/heimdal/appl/push/push.c')
-rw-r--r-- | crypto/heimdal/appl/push/push.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/crypto/heimdal/appl/push/push.c b/crypto/heimdal/appl/push/push.c index eb4b814..2f051ee 100644 --- a/crypto/heimdal/appl/push/push.c +++ b/crypto/heimdal/appl/push/push.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2000 Kungliga Tekniska Högskolan + * Copyright (c) 1997-2001 Kungliga Tekniska Högskolan * (Royal Institute of Technology, Stockholm, Sweden). * All rights reserved. * @@ -32,7 +32,7 @@ */ #include "push_locl.h" -RCSID("$Id: push.c,v 1.44 2001/02/20 01:44:47 assar Exp $"); +RCSID("$Id: push.c,v 1.45 2001/09/04 09:45:52 assar Exp $"); #ifdef KRB4 static int use_v4 = -1; @@ -208,7 +208,7 @@ doit(int s, { int ret; char out_buf[PUSH_BUFSIZ]; - size_t out_len = 0; + int out_len = 0; char in_buf[PUSH_BUFSIZ + 1]; /* sentinel */ size_t in_len = 0; char *in_ptr = in_buf; @@ -262,6 +262,8 @@ doit(int s, out_len = snprintf (out_buf, sizeof(out_buf), "USER %s\r\nPASS hej\r\nSTAT\r\n", user); + if (out_len < 0) + errx (1, "snprintf failed"); if (net_write (s, out_buf, out_len) != out_len) err (1, "write"); if (verbose > 1) @@ -464,6 +466,8 @@ 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) + errx (1, "snprintf failed"); if (net_write (s, out_buf, out_len) != out_len) err (1, "write"); if (verbose > 1) |