/* This file is part of the YAZ toolkit.
- * Copyright (C) 1995-2013 Index Data
+ * Copyright (C) Index Data
* See the file LICENSE for details.
*/
/**
Odr_oct *odr_create_Odr_oct(ODR o, const char *buf, int sz)
{
Odr_oct *p = (Odr_oct *) odr_malloc(o, sizeof(Odr_oct));
- p->buf = (char *) odr_malloc(o, sz);
- memcpy(p->buf, buf, sz);
+ p->buf = odr_strdupn(o, buf, sz);
p->len = sz;
return p;
}