X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=client%2Fadmin.c;h=de29207abe8385c3e13962604251d2fa81100770;hp=14aa2814824a2cb81825a6c6849802ec30919448;hb=7da0c7d1755ad3b33bfc48f744bb0b35f4277b1a;hpb=0c46d2e66bdeea1600e700124a81a5d0a65d349e diff --git a/client/admin.c b/client/admin.c index 14aa281..de29207 100644 --- a/client/admin.c +++ b/client/admin.c @@ -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); }