projects
/
yaz-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Allow use of Nettle as an alternative to gcrypt
[yaz-moved-to-github.git]
/
src
/
ber_oct.c
diff --git
a/src/ber_oct.c
b/src/ber_oct.c
index
8c60fc7
..
a88da37
100644
(file)
--- a/
src/ber_oct.c
+++ b/
src/ber_oct.c
@@
-1,5
+1,5
@@
/* This file is part of the YAZ toolkit.
/* This file is part of the YAZ toolkit.
- * Copyright (C) 1995-2013 Index Data
+ * Copyright (C) Index Data
* See the file LICENSE for details.
*/
* See the file LICENSE for details.
*/
@@
-53,9
+53,7
@@
int ber_octetstring(ODR o, Odr_oct *p, int cons)
return 0;
}
p->len = len;
return 0;
}
p->len = len;
- p->buf = odr_malloc(o, len + 1);
- memcpy(p->buf, o->op->bp, len);
- p->buf[len] = '\0';
+ p->buf = odr_strdupn(o, o->op->bp, len);
o->op->bp += len;
return 1;
case ODR_ENCODE:
o->op->bp += len;
return 1;
case ODR_ENCODE: