(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:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user