search for: inlen

Displaying 20 results from an estimated 86 matches for "inlen".

Did you mean: inen
2011 Dec 22
2
Decoding only a certain frame results in different values than when decoding the entire file
To make it complete, here is the code that I am using to encode a large file: int __stdcall SpxEncode(unsigned char* inBuf, unsigned char* outBuf, unsigned int inlen) { //char *testFile; //FILE *ftest; //testFile = "test"; //ftest = fopen(testFile, "wb"); //fwrite(inBuf,1,inlen,ftest); //take every 320 bytes //copy every short to float array, and make sure to put null in unused area float input[MAX_...
2020 May 11
2
Segfault on read.socket with long message
...%d",port) sock <- make.socket("localhost",port,server=TRUE) on.exit({ close.socket(sock) flog.trace("Closing Socket on port %d",port) }) repeat { ## Input a hunk of stuff up to a blank line. output <- character() repeat { inlen <- read.socket(sock,loop=TRUE) flog.trace("Got message of length %s",inlen) if (inlen=="quit") break inmess <- fromJSON(read.socket(sock,as.integer(inlen)),false) outmess <- doProcess(inmess) output <- toJSON(outmess) flog.tr...
2020 May 12
1
Segfault on read.socket with long message
...ver=TRUE) >> ? on.exit({ >> ??? close.socket(sock) >> ??? flog.trace("Closing Socket on port %d",port) >> ??? }) >> ? repeat { >> ??? ## Input a hunk of stuff up to a blank line. >> ??? output <- character() >> ??? repeat { >> ????? inlen <- read.socket(sock,loop=TRUE) >> ????? flog.trace("Got message of length %s",inlen) >> ????? if (inlen=="quit") break >> ????? inmess <- fromJSON(read.socket(sock,as.integer(inlen)),false) >> ????? outmess <- doProcess(inmess) >> ????? out...
2019 Nov 06
0
【SPEEX】 use speex resample make noise
...sampler_init(1, 16000, 48000, 10, &err); >     FILE *fp = fopen("/data/zhou.wav", "rb+"); >     FILE *fp2 = fopen("/data/zhou2.wav", "ab+"); >     spx_int16_t inbuff[640] = {0}; >     spx_int16_t outbuff[1920] = {0}; >     spx_uint32_t inlen = 640; >     spx_uint32_t outlen = 1920; >     while (1) >     { >         speex_resampler_reset_mem(speex_resampler); >         int len = fread(inbuff, 2, 320, fp); >         if (len <= 0) >         { >             break; >         } >         int ret = s...
2020 Aug 06
1
[PATCH][next] vdpa/mlx5: fix memory allocation failure checks
.../net/mlx5_vnet.c index 3ec44a4f0e45..55bc58e1dae9 100644 --- a/drivers/vdpa/mlx5/net/mlx5_vnet.c +++ b/drivers/vdpa/mlx5/net/mlx5_vnet.c @@ -867,7 +867,7 @@ static void alloc_inout(struct mlx5_vdpa_net *ndev, int cmd, void **in, int *inl *outlen = MLX5_ST_SZ_BYTES(qp_2rst_out); *in = kzalloc(*inlen, GFP_KERNEL); *out = kzalloc(*outlen, GFP_KERNEL); - if (!in || !out) + if (!*in || !*out) goto outerr; MLX5_SET(qp_2rst_in, *in, opcode, cmd); @@ -879,7 +879,7 @@ static void alloc_inout(struct mlx5_vdpa_net *ndev, int cmd, void **in, int *inl *outlen = MLX5_ST_SZ_BYTES(rst2init_q...
2020 May 12
0
Segfault on read.socket with long message
...ocket("localhost",port,server=TRUE) > ? on.exit({ > ??? close.socket(sock) > ??? flog.trace("Closing Socket on port %d",port) > ??? }) > ? repeat { > ??? ## Input a hunk of stuff up to a blank line. > ??? output <- character() > ??? repeat { > ????? inlen <- read.socket(sock,loop=TRUE) > ????? flog.trace("Got message of length %s",inlen) > ????? if (inlen=="quit") break > ????? inmess <- fromJSON(read.socket(sock,as.integer(inlen)),false) > ????? outmess <- doProcess(inmess) > ????? output <- toJSON(out...
2020 Jul 16
0
[PATCH vhost next 10/10] vdpa/mlx5: Add VDPA driver for supported mlx5 devices
...p) > +{ > + mlx5_frag_buf_free(ndev->mvdev.mdev, &vqp->frag_buf); > +} > + > +static int qp_create(struct mlx5_vdpa_net *ndev, struct mlx5_vdpa_virtqueue *mvq, > + struct mlx5_vdpa_qp *vqp) > +{ > + struct mlx5_core_dev *mdev = ndev->mvdev.mdev; > + int inlen = MLX5_ST_SZ_BYTES(create_qp_in); > + u32 out[MLX5_ST_SZ_DW(create_qp_out)] = {}; > + void *qpc; > + void *in; > + int err; > + > + if (!vqp->fw) { > + vqp = &mvq->vqqp; > + err = rq_buf_alloc(ndev, vqp, mvq->num_ent); > + if (err) > + return err; &gt...
2011 Dec 23
0
Decoding only a certain frame results in different values than when decoding the entire file
...re, and there are no sources to investigate on. Thank you. Hermann Am 22.12.2011 20:55, schrieb Hermann Weber: > To make it complete, here is the code that I am using to encode a large > file: > > int __stdcall SpxEncode(unsigned char* inBuf, unsigned char* outBuf, > unsigned int inlen) > { > //char *testFile; > //FILE *ftest; > //testFile = "test"; > //ftest = fopen(testFile, "wb"); > //fwrite(inBuf,1,inlen,ftest); > > //take every 320 bytes > //copy every short to float array, and make sure...
2013 Jun 19
3
[PATCH] virtio-spec: add field for scsi command size
Il 19/06/2013 10:24, Michael S. Tsirkin ha scritto: >> > 2) We introduce VIRTIO_NET_F_ANY_LAYOUT and VIRTIO_BLK_F_ANY_LAYOUT >> > specifically for net and block (note the new names). So why not a transport feature? Is it just because the SCSI commands for virtio-blk also require a config space field? Sorry if I missed this upthread. Paolo >> > 3) I note the
2013 Jun 19
3
[PATCH] virtio-spec: add field for scsi command size
Il 19/06/2013 10:24, Michael S. Tsirkin ha scritto: >> > 2) We introduce VIRTIO_NET_F_ANY_LAYOUT and VIRTIO_BLK_F_ANY_LAYOUT >> > specifically for net and block (note the new names). So why not a transport feature? Is it just because the SCSI commands for virtio-blk also require a config space field? Sorry if I missed this upthread. Paolo >> > 3) I note the
2018 Feb 28
0
[PATCH v3 1/2] common: extract UTF-8 conversion function
...guestfs_int_parse_nonstandard_uri (const char *arg) return ret; } - -/* Would be const, but the interface to iconv is not const-correct on - * all platforms. The input string is not touched. - */ -static char * -local_string_to_utf8 (/* const */ char *input) -{ - iconv_t ic; - size_t len, inlen, outlen, outalloc, r, prev; - int err; - char *out, *inp, *outp; - - /* Convert from input locale to UTF-8. */ - ic = iconv_open ("UTF-8", nl_langinfo (CODESET)); - if (ic == (iconv_t) -1) - return NULL; - - len = strlen (input); - outalloc = len; /* Initial guess....
2013 Jun 20
0
[PATCH] virtio-spec: add field for scsi command size
...h) { + BUG_ON(dnum == 0); + dst++; + dnum--; + d = *dst; + } + } +} + +static bool torture_replace(struct scatterlist **sg, + unsigned int *out, + unsigned int *in, + void **data, + gfp_t gfp) +{ + static size_t seed; + struct torture *t; + unsigned long outlen, inlen, ourseed, len1; + void *buf; + + if (!device_torture) + return true; + + outlen = tot_len(*sg, *out); + inlen = tot_len(*sg + *out, *in); + + /* This will break horribly on large block requests. */ + t = kmalloc(sizeof(*t) + (*out + *in) * sizeof(t->orig_sg[1]) + + outlen + 1 + inlen + 1,...
2011 Dec 23
2
Decoding only a certain frame results in different values than when decoding the entire file
.... > > Thank you. > > Hermann > > Am 22.12.2011 20:55, schrieb Hermann Weber: >> To make it complete, here is the code that I am using to encode a large >> file: >> >> int __stdcall SpxEncode(unsigned char* inBuf, unsigned char* outBuf, >> unsigned int inlen) >> { >> //char *testFile; >> //FILE *ftest; >> //testFile = "test"; >> //ftest = fopen(testFile, "wb"); >> //fwrite(inBuf,1,inlen,ftest); >> >> //take every 320 bytes >> //cop...
2020 Aug 07
1
[PATCH] vdpa/mlx5: Fix erroneous null pointer checks
...4a4f0e45..bcb6600c2839 100644 > --- a/drivers/vdpa/mlx5/net/mlx5_vnet.c > +++ b/drivers/vdpa/mlx5/net/mlx5_vnet.c > @@ -867,7 +867,7 @@ static void alloc_inout(struct mlx5_vdpa_net *ndev, int cmd, void **in, int *inl > *outlen = MLX5_ST_SZ_BYTES(qp_2rst_out); > *in = kzalloc(*inlen, GFP_KERNEL); > *out = kzalloc(*outlen, GFP_KERNEL); > - if (!in || !out) > + if (!*in || !*out) > goto outerr; > > MLX5_SET(qp_2rst_in, *in, opcode, cmd); > @@ -879,7 +879,7 @@ static void alloc_inout(struct mlx5_vdpa_net *ndev, int cmd, void **in, int *inl &...
2014 Jan 06
1
Re: [PATCH 2/2] lib: utf16: Fix const-correctness issues in _hivex_recode function.
...- > [...] > @@ -51,10 +51,11 @@ _hivex_recode (char *input_encoding, const char > *input, size_t input_len, errno = err; > return NULL; > } > - char *inp = input; > + const char *inp = input; > char *outp = out; > > - size_t r = iconv (ic, &inp, &inlen, &outp, &outlen); > + /* Surely iconv doesn't really modify the input buffer? XXX */ > + size_t r = iconv (ic, (char **) &inp, &inlen, &outp, &outlen); > if (r == (size_t) -1) { This (the constness of the input argument) is the difference between the icon...
2013 Dec 31
2
[PATCH 1/2] lib: write: Remove unused variable.
--- lib/write.c | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/write.c b/lib/write.c index 8c4dd8e..384c6b2 100644 --- a/lib/write.c +++ b/lib/write.c @@ -954,7 +954,6 @@ hivex_node_set_values (hive_h *h, hive_node_h node, for (i = 0; i < nr_values; ++i) { /* Allocate vk record to store this (key, value) pair. */ static const char vk_id[2] = { 'v', 'k' }; -
2013 Jun 20
3
[PATCH] virtio-spec: add field for scsi command size
...> + } > + } > +} > + > +static bool torture_replace(struct scatterlist **sg, > + unsigned int *out, > + unsigned int *in, > + void **data, > + gfp_t gfp) > +{ > + static size_t seed; > + struct torture *t; > + unsigned long outlen, inlen, ourseed, len1; > + void *buf; > + > + if (!device_torture) > + return true; > + > + outlen = tot_len(*sg, *out); > + inlen = tot_len(*sg + *out, *in); > + > + /* This will break horribly on large block requests. */ > + t = kmalloc(sizeof(*t) + (*out + *in) * sizeof(t...
2013 Jun 20
3
[PATCH] virtio-spec: add field for scsi command size
...> + } > + } > +} > + > +static bool torture_replace(struct scatterlist **sg, > + unsigned int *out, > + unsigned int *in, > + void **data, > + gfp_t gfp) > +{ > + static size_t seed; > + struct torture *t; > + unsigned long outlen, inlen, ourseed, len1; > + void *buf; > + > + if (!device_torture) > + return true; > + > + outlen = tot_len(*sg, *out); > + inlen = tot_len(*sg + *out, *in); > + > + /* This will break horribly on large block requests. */ > + t = kmalloc(sizeof(*t) + (*out + *in) * sizeof(t...
2018 Feb 28
2
[PATCH v3 0/2] inspect: basic UTF-8 encoding for rpm
Diff to v2: * inlined local_string_to_utf8 Cédric Bosdonnat (2): common: extract UTF-8 conversion function inspector: rpm summary and description may not be utf-8 common/utils/guestfs-utils.h | 11 +++++ common/utils/libxml2-utils.c | 69 +-------------------------- common/utils/utils.c | 64 +++++++++++++++++++++++++
2019 Feb 28
0
[PATCH branch 1.1] fix: use EVP_DecryptUpdate while decrypting
...c/openssl/cipher.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/openssl/cipher.c b/src/openssl/cipher.c index d51ec0d..974fbeb 100644 --- a/src/openssl/cipher.c +++ b/src/openssl/cipher.c @@ -189,7 +189,7 @@ bool cipher_decrypt(cipher_t *cipher, const void *indata, size_t inlen, void *ou } else { int len; - if(EVP_EncryptUpdate(cipher->ctx, outdata, &len, indata, inlen)) { + if(EVP_DecryptUpdate(cipher->ctx, outdata, &len, indata, inlen)) { if(outlen) { *outlen = len; } -- 2.19.2