aboutsummaryrefslogtreecommitdiffstats
path: root/common/t-iobuf.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* indent: Fix spellingDaniel Kahn Gillmor2024-05-311-1/+1
| | | | | | | | | | | | | -- These are non-substantive corrections for minor spelling mistakes within the GnuPG codebase. With something like this applied to the codebase, and a judiciously tuned spellchecker integrated as part of a standard test suite, it should be possible to keep a uniform orthography within the project. GnuPG-bug-id: 7116
* common: Fix malloc nit in regression test.Werner Koch2023-05-111-5/+51
| | | | | | | | * common/t-iobuf.c: Add boilerplate. (xmalloc): New. Use it everywhere. -- GnuPG-bug-id: 6483
* Replace use of variable-length-arrays.Werner Koch2017-01-021-2/+4
| | | | | | | | | | | | | * common/t-iobuf.c (main): Replace variable-length-array. * g10/gpgcompose.c (mksubpkt_callback): Ditto. (encrypted): Ditto. * g10/t-stutter.c (log_hexdump): Ditto. (oracle_test): Ditto. * g10/tofu.c (get_policy): Ditto. Use "%zu" for size_t. * scd/app-openpgp.c (ecc_writekey): Replace variable-length-array. Check for zero length OID_LEN. Signed-off-by: Werner Koch <[email protected]>
* common: Fix memory leaks.Justus Winter2016-06-281-1/+14
| | | | | | | | | | | | | * common/ccparray.c (ccparray_put): Free old array. * common/stringhelp.c (do_make_filename): Free 'home'. * common/t-convert.c: Fix trivial memory leaks. * common/t-iobuf.c: Likewise. * common/t-mbox-util.c: Likewise. * common/t-name-value.c: Likewise. * common/t-stringhelp.c: Likewise. * common/t-strlist.c: Likewise. Signed-off-by: Justus Winter <[email protected]>
* common: Fix iobuf API of filter function for alignment.NIIBE Yutaka2016-01-121-2/+3
| | | | | | | | | | | | | | | | | | | | | * common/iobuf.h (IOBUFCTRL_DESC): Change the call semantics. * common/iobuf.c (iobuf_desc): Add the second argument DESC. (print_chain, iobuf_close, do_open, iobuf_sockopen, iobuf_ioctl) (iobuf_push_filter2, pop_filter, iobuf_write_temp): Change calls of iobuf_desc. (file_filter, file_es_filter, sock_filter, block_filter): Fill the description. * common/t-iobuf.c (every_other_filter, double_filter): Likewise. * g10/armor.c, g10/cipher.c, g10/compress-bz2.c, g10/compress.c, g10/decrypt-data.c, g10/encrypt.c, g10/mdfilter.c, g10/progress.c, g10/textfilter.c: Likewise. -- Newer GCC warns against possible alignment difference of pointers. This change can silence those warnings. Signed-off-by: NIIBE Yutaka <[email protected]>
* iobuf: Reduce verbosity of test.Neal H. Walfield2015-09-021-0/+2
| | | | | | | * common/t-iobuf.c (main): Reduce verbosity. -- Signed-off-by: Neal H. Walfield <[email protected]>.
* iobuf: Fix test.Neal H. Walfield2015-09-021-9/+6
| | | | | | | | | * common/t-iobuf.c (content_filter): If there is nothing to read, don't forget to set *LEN to 0. (main): Fix checks. -- Signed-off-by: Neal H. Walfield <[email protected]>.
* doc: Remove C++ style comments and update HACKING.Werner Koch2015-08-201-9/+9
| | | | --
* common/iobuf.c: Buffered data should not be processed by new filters.Neal H. Walfield2015-08-201-3/+101
| | | | | | | | | | | | * common/iobuf.c (iobuf_push_filter2): If the pipeline is an output or temp pipeline, the new filter shouldn't assume ownership of the old head's internal buffer: the data was written before the filter was added. * common/t-iobuf.c (double_filter): New function. (main): Add test cases for the above bug. -- Signed-off-by: Neal H. Walfield <[email protected]>.
* common/t-iobuf.c: Add a test case for multiple EOFs.Neal H. Walfield2015-08-201-0/+93
| | | | | | | | common/t-iobuf.c (main): Add a test case for multiple EOFs in an INPUT pipeline. -- Signed-off-by: Neal H. Walfield <[email protected]>.
* common/iobuf.c: Better respect boundary conditions in iobuf_read_line.Neal H. Walfield2015-08-201-0/+188
* common/iobuf.c (iobuf_read_line): Be more careful with boundary conditions. * common/iobuf.h: Include <gpg-error.h>. * common/t-iobuf.c: New file. * common/Makefile.am (module_tests): Add t-iobuf. (t_mbox_util_LDADD): New variable. -- Signed-off-by: Neal H. Walfield <[email protected]>.