Home GnuPG
Diffusion GnuPG c5da750cf3d5

common/iobuf.c: Add some sanity checks to catch programmer bugs.
c5da750cf3d5Unpublished

Unpublished Commit ยท Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.

Description

common/iobuf.c: Add some sanity checks to catch programmer bugs.

* common/iobuf.c (iobuf_alloc): Check that BUFSIZE is not 0.
(iobuf_readbyte): Check that A is an input filter.  Check that the
amount of read data is at most the amount of buffered data.
(iobuf_read): Check that A is an input filter.
(iobuf_writebyte): Check that A is not an input filter.
(iobuf_writestr): Check that A is not an input filter.
(iobuf_flush_temp): Check that A is not an input filter.
  • Signed-off-by: Neal H. Walfield <neal@g10code.com>.

Details

Provenance
Neal H. Walfield <neal@g10code.com>Authored on Aug 17 2015, 12:52 PM
Parents
rGe291b631c3b1: common/iobuf.c:iobuf_write_temp: Elide redundant code.
Branches
Unknown
Tags
Unknown

Event Timeline

Neal H. Walfield <neal@g10code.com> committed rGc5da750cf3d5: common/iobuf.c: Add some sanity checks to catch programmer bugs. (authored by Neal H. Walfield <neal@g10code.com>).Aug 20 2015, 2:16 PM