krb5_data -> octet_string, char * -> general_string
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@1873 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -1,18 +1,18 @@
|
||||
#include "asn1_locl.h"
|
||||
#include "libasn1.h"
|
||||
|
||||
RCSID("$Id$");
|
||||
|
||||
void
|
||||
copy_general_string (char **from, char **to)
|
||||
copy_general_string (general_string *from, general_string *to)
|
||||
{
|
||||
*to = malloc(strlen(*from) + 1);
|
||||
strcpy(*to, *from);
|
||||
}
|
||||
|
||||
void
|
||||
copy_octet_string (krb5_data *from, krb5_data *to)
|
||||
copy_octet_string (octet_string *from, octet_string *to)
|
||||
{
|
||||
to->len = from->len;
|
||||
to->data = malloc(to->len);
|
||||
memcpy(to->data, from->data, to->len);
|
||||
to->length = from->length;
|
||||
to->data = malloc(to->length);
|
||||
memcpy(to->data, from->data, to->length);
|
||||
}
|
||||
|
Reference in New Issue
Block a user