(copy_oid): copy all components

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@13084 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2003-11-07 07:39:43 +00:00
parent 113cf794d6
commit 48a9c79e8f

View File

@@ -62,6 +62,7 @@ copy_oid (const heim_oid *from, heim_oid *to)
to->components = malloc(to->length * sizeof(*to->components));
if (to->length != 0 && to->components == NULL)
return ENOMEM;
memcpy(to->components, from->components, to->length);
memcpy(to->components, from->components,
to->length * sizeof(*to->components));
return 0;
}