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/lib Apply patch from Pet...
details: https://anonhg.NetBSD.org/src/rev/81995d22d2bf
branches: trunk
changeset: 758429:81995d22d2bf
user: agc <agc%NetBSD.org@localhost>
date: Thu Nov 04 16:13:35 2010 +0000
description:
Apply patch from Peter Pentchev in PR 44040
The patch fixes two problems when verifying a clearsigned message:
- a copy/paste error - "litdata" should be "cleartext"
- a use of an uninitialized variable, resulting in freeing
an uninitialized pointer on the stack... resulting in a segfault
diffstat:
crypto/external/bsd/netpgp/dist/src/lib/reader.c | 4 ++--
crypto/external/bsd/netpgp/dist/src/lib/validate.c | 6 +++---
2 files changed, 5 insertions(+), 5 deletions(-)
diffs (45 lines):
diff -r 8828c705b464 -r 81995d22d2bf crypto/external/bsd/netpgp/dist/src/lib/reader.c
--- a/crypto/external/bsd/netpgp/dist/src/lib/reader.c Thu Nov 04 15:40:43 2010 +0000
+++ b/crypto/external/bsd/netpgp/dist/src/lib/reader.c Thu Nov 04 16:13:35 2010 +0000
@@ -54,7 +54,7 @@
#if defined(__NetBSD__)
__COPYRIGHT("@(#) Copyright (c) 2009 The NetBSD Foundation, Inc. All rights reserved.");
-__RCSID("$NetBSD: reader.c,v 1.42 2010/08/15 16:36:24 agc Exp $");
+__RCSID("$NetBSD: reader.c,v 1.43 2010/11/04 16:13:35 agc Exp $");
#endif
#include <sys/types.h>
@@ -681,8 +681,8 @@
"process_dash_escaped: bad body length\n");
return -1;
}
-
/* don't send that one character, because it's part of the trailer */
+ (void) memset(&content2, 0x0, sizeof(content2));
CALLBACK(OPS_PTAG_CT_SIGNED_CLEARTEXT_TRAILER, cbinfo, &content2);
return total;
}
diff -r 8828c705b464 -r 81995d22d2bf crypto/external/bsd/netpgp/dist/src/lib/validate.c
--- a/crypto/external/bsd/netpgp/dist/src/lib/validate.c Thu Nov 04 15:40:43 2010 +0000
+++ b/crypto/external/bsd/netpgp/dist/src/lib/validate.c Thu Nov 04 16:13:35 2010 +0000
@@ -54,7 +54,7 @@
#if defined(__NetBSD__)
__COPYRIGHT("@(#) Copyright (c) 2009 The NetBSD Foundation, Inc. All rights reserved.");
-__RCSID("$NetBSD: validate.c,v 1.39 2010/08/15 16:36:24 agc Exp $");
+__RCSID("$NetBSD: validate.c,v 1.40 2010/11/04 16:13:35 agc Exp $");
#endif
#include <sys/types.h>
@@ -461,8 +461,8 @@
case OPS_PTAG_CT_SIGNED_CLEARTEXT_BODY:
data->data.cleartext_body = content->cleartext_body;
data->type = SIGNED_CLEARTEXT;
- __ops_memory_add(data->mem, data->data.litdata_body.data,
- data->data.litdata_body.length);
+ __ops_memory_add(data->mem, data->data.cleartext_body.data,
+ data->data.cleartext_body.length);
return OPS_KEEP_MEMORY;
case OPS_PTAG_CT_SIGNED_CLEARTEXT_TRAILER:
Home |
Main Index |
Thread Index |
Old Index