Home GnuPG
Diffusion GnuPG b2572b0c386f

common: Fix iobuf_peek corner case.
b2572b0c386fUnpublished

Unpublished Commit ยท Learn More

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

Description

common: Fix iobuf_peek corner case.

Previously, iobuf_peek on a file smaller than 'buflen' would hang.

  • common/iobuf.c (underflow): Generalize by adding a target parameter.

(iobuf_peek): Use this to prevent looping here.

  • tests/openpgp/Makefile.am (TESTS): Add new test.
  • tests/openpgp/setup.scm (dearmor): Move function...
  • tests/openpgp/defs.scm (dearmor): ... here.
  • tests/openpgp/issue2419.scm: New file.
  • tests/openpgp/samplemsgs/issue2419.asc: Likewise.
  • GnuPG-bug-id: T2419
  • Signed-off-by: Justus Winter <justus@g10code.com>

Details

Provenance
justusAuthored on Jul 26 2016, 6:29 PM
Parents
rG046338b8494c: gpgscm: Do not shadow common function name in catch macro.
Branches
Unknown
Tags
Unknown

Event Timeline

Justus Winter <justus@g10code.com> committed rGb2572b0c386f: common: Fix iobuf_peek corner case. (authored by Justus Winter <justus@g10code.com>).Jul 26 2016, 6:37 PM
justus mentioned this in Unknown Object (Maniphest Task).Mar 27 2017, 5:10 PM
justus mentioned this in Unknown Object (Maniphest Task).Mar 27 2017, 5:33 PM