Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/crypto/external/bsd/netpgp/dist/src/hkpclient fix an off-by-...



details:   https://anonhg.NetBSD.org/src/rev/a270e1e66394
branches:  trunk
changeset: 757948:a270e1e66394
user:      agc <agc%NetBSD.org@localhost>
date:      Wed Oct 06 09:57:48 2010 +0000

description:
fix an off-by-one error when printing the key from the server when retrieving
with the "get" command.

fix up an erroneous error message

diffstat:

 crypto/external/bsd/netpgp/dist/src/hkpclient/hkpc.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (21 lines):

diff -r fe9d9d70a573 -r a270e1e66394 crypto/external/bsd/netpgp/dist/src/hkpclient/hkpc.c
--- a/crypto/external/bsd/netpgp/dist/src/hkpclient/hkpc.c      Wed Oct 06 07:59:18 2010 +0000
+++ b/crypto/external/bsd/netpgp/dist/src/hkpclient/hkpc.c      Wed Oct 06 09:57:48 2010 +0000
@@ -74,7 +74,7 @@
         }
         freeaddrinfo(res);
         if (rc < 0) {
-                (void) fprintf(stderr, "bind() to %s:%d failed (rc %d)\n",
+                (void) fprintf(stderr, "connect() to %s:%d failed (rc %d)\n",
                                hostname, port, rc);
         }
         return sock;
@@ -128,7 +128,7 @@
        if (strcmp(op, "index") == 0 || strcmp(op, "vindex") == 0) {
                ret = netpgp_format_json(fp, &res[(int)matches[0].rm_eo], 1);
        } else {
-               (void) fprintf(fp, "%s\n", &res[(int)matches[0].rm_eo + 1]);
+               (void) fprintf(fp, "%s\n", &res[(int)matches[0].rm_eo]);
                ret = 1;
        }
        return ret;



Home | Main Index | Thread Index | Old Index