From fcusack@ratbert.iconnet.net Mon Nov 9 11:02:21 1998
Received: from MIT.EDU (SOUTH-STATION-ANNEX.MIT.EDU [18.72.1.2]) by rt-11.MIT.EDU (8.7.5/8.7.3) with SMTP id LAA22481 for <bugs@RT-11.MIT.EDU>; Mon, 9 Nov 1998 11:02:20 -0500
Received: from ratbert.iconnet.net by MIT.EDU with SMTP
id AA25034; Mon, 9 Nov 98 11:02:13 EST
Received: (from fcusack@localhost)
by ratbert.iconnet.net (8.9.1/8.9.1) id LAA13386;
Mon, 9 Nov 1998 11:02:55 -0500 (EST)
Message-Id: <199811091602.LAA13386@ratbert.iconnet.net>
Date: Mon, 9 Nov 1998 11:02:55 -0500 (EST)
From: fcusack@iconnet.net
Reply-To: fcusack@iconnet.net
To: krb5-bugs@MIT.EDU
Subject: krb5_copy_key_contents() broken
X-Send-Pr-Version: 3.99
System: SunOS ratbert 5.6 Generic_105181-09 sun4u sparc SUNW,Ultra-5_10
Architecture: sun4
from->contents.
--- cp_key_cnt.c 1998/10/14 00:47:17 1.1
+++ cp_key_cnt.c 1998/11/09 15:58:34 1.4
@@ -35,7 +35,12 @@
const krb5_keyblock FAR *from;
krb5_keyblock FAR *to;
{
+#ifdef HAVE_C_STRUCTURE_ASSIGNMENT
*to = *from;
+#else
+ memcpy(to, from, sizeof(krb5_keyblock));
+#endif
+
to->contents = (krb5_octet *)malloc(to->length);
if (!to->contents)
return ENOMEM;
State-Changed-From-To: open-closed
State-Changed-By: tytso
State-Changed-When: Fri Jan 22 00:46:58 1999
State-Changed-Why: Not actually a bug. Structure assignment can be assumed.
Received: from MIT.EDU (SOUTH-STATION-ANNEX.MIT.EDU [18.72.1.2]) by rt-11.MIT.EDU (8.7.5/8.7.3) with SMTP id LAA22481 for <bugs@RT-11.MIT.EDU>; Mon, 9 Nov 1998 11:02:20 -0500
Received: from ratbert.iconnet.net by MIT.EDU with SMTP
id AA25034; Mon, 9 Nov 98 11:02:13 EST
Received: (from fcusack@localhost)
by ratbert.iconnet.net (8.9.1/8.9.1) id LAA13386;
Mon, 9 Nov 1998 11:02:55 -0500 (EST)
Message-Id: <199811091602.LAA13386@ratbert.iconnet.net>
Date: Mon, 9 Nov 1998 11:02:55 -0500 (EST)
From: fcusack@iconnet.net
Reply-To: fcusack@iconnet.net
To: krb5-bugs@MIT.EDU
Subject: krb5_copy_key_contents() broken
X-Send-Pr-Version: 3.99
Show quoted text
>Number: 657
>Category: krb5-libs
>Synopsis: krb5_copy_key_contents() broken
>Confidential: no
>Severity: critical
>Priority: high
>Responsible: krb5-unassigned
>State: closed
>Class: mistaken
>Submitter-Id: unknown
>Arrival-Date: Mon Nov 09 11:03:01 EST 1998
>Last-Modified: Fri Jan 22 00:48:03 EST 1999
>Originator: Frank Cusack
>Organization:
Icon CMT Corp.>Category: krb5-libs
>Synopsis: krb5_copy_key_contents() broken
>Confidential: no
>Severity: critical
>Priority: high
>Responsible: krb5-unassigned
>State: closed
>Class: mistaken
>Submitter-Id: unknown
>Arrival-Date: Mon Nov 09 11:03:01 EST 1998
>Last-Modified: Fri Jan 22 00:48:03 EST 1999
>Originator: Frank Cusack
>Organization:
Show quoted text
>Release: krb5-current-19981012
>Environment:
systems that do not have "c structure assignment">Environment:
System: SunOS ratbert 5.6 Generic_105181-09 sun4u sparc SUNW,Ultra-5_10
Architecture: sun4
Show quoted text
>Description:
krb5_copy_key_contents simply points to -> from, and leaksfrom->contents.
Show quoted text
>How-To-Repeat:
>Fix:
diff -u -r1.1 -r1.4>Fix:
--- cp_key_cnt.c 1998/10/14 00:47:17 1.1
+++ cp_key_cnt.c 1998/11/09 15:58:34 1.4
@@ -35,7 +35,12 @@
const krb5_keyblock FAR *from;
krb5_keyblock FAR *to;
{
+#ifdef HAVE_C_STRUCTURE_ASSIGNMENT
*to = *from;
+#else
+ memcpy(to, from, sizeof(krb5_keyblock));
+#endif
+
to->contents = (krb5_octet *)malloc(to->length);
if (!to->contents)
return ENOMEM;
Show quoted text
>Audit-Trail:
State-Changed-From-To: open-closed
State-Changed-By: tytso
State-Changed-When: Fri Jan 22 00:46:58 1999
State-Changed-Why: Not actually a bug. Structure assignment can be assumed.
Show quoted text
>Unformatted: