X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=client%2Fadmin.c;h=de29207abe8385c3e13962604251d2fa81100770;hb=80559dbf0a5d6993eef844e6f6198d28ff5a44fa;hp=faaa2275e673b40df0b5211ee68b157a278146a3;hpb=5242cb5a8634bfa38b9333ff7f903e718ac6e292;p=yaz-moved-to-github.git diff --git a/client/admin.c b/client/admin.c index faaa227..de29207 100644 --- a/client/admin.c +++ b/client/admin.c @@ -1,5 +1,5 @@ /* This file is part of the YAZ toolkit. - * Copyright (C) 1995-2012 Index Data + * Copyright (C) 1995-2013 Index Data * See the file LICENSE for details. */ #if HAVE_CONFIG_H @@ -237,9 +237,9 @@ int cmd_adm_import(const char *arg) Z_FragmentSyntax_notExternallyTagged; rec->u.intermediateFragment->u.notExternallyTagged = oct; - oct->len = oct->size = status.st_size; - oct->buf = (unsigned char *) odr_malloc (out, oct->size); - if (fread(oct->buf, 1, oct->size, inf) != (size_t) oct->size) + oct->len = status.st_size; + oct->buf = (char *) odr_malloc (out, oct->len); + if (fread(oct->buf, 1, oct->len, inf) != (size_t) oct->len) { printf("Incomplete read of file %s\n", fname); }