X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=src%2Fodr_mem.c;h=71a10e147137cd99ae935afdea8920bf53d30f7c;hp=28181e323d058db2f5fb3163896fc70b63bbb5ad;hb=b696a59e5609651787b64b953b581a3ceb263f14;hpb=833bf58328945361db8a744c0dec2c925c97d43a diff --git a/src/odr_mem.c b/src/odr_mem.c index 28181e3..71a10e1 100644 --- a/src/odr_mem.c +++ b/src/odr_mem.c @@ -1,5 +1,5 @@ /* This file is part of the YAZ toolkit. - * Copyright (C) 1995-2013 Index Data + * Copyright (C) Index Data * See the file LICENSE for details. */ /** @@ -65,8 +65,7 @@ size_t odr_total(ODR o) 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; }