[PATCH] Fix show -c/-q with large entries

Jö Fahlke jorrit at jorrit.de
Sun Jun 11 19:24:09 UTC 2023


Hi,

I noticed that for one entry in my pass store `show -c` had stopped working.
Apparently I went a bit overboard with supplemental information in that entry
and now `show -c` was reporting a SIGPIPE since earlier commands in some
internal pipeline were still trying to write while later commands had already
extracted the password line and closed the read end.

Attached are two patches, one that adds some tests to detect this situation,
and one that fixes the actual problem.  Although I saw the problem initially
with `show -c`, the tests are written for `show -q` since that seems easier to
do portably.

Note: tested on Linux only since that's all I have access to.

Thanks for your work,
Jö.

-- 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Test-show-q-with-large-secrets.patch
Type: text/x-diff
Size: 3040 bytes
Desc: not available
URL: <http://lists.zx2c4.com/pipermail/password-store/attachments/20230611/53760e4c/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Fix-show-q-c-for-long-secrets.patch
Type: text/x-diff
Size: 2202 bytes
Desc: not available
URL: <http://lists.zx2c4.com/pipermail/password-store/attachments/20230611/53760e4c/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.zx2c4.com/pipermail/password-store/attachments/20230611/53760e4c/attachment.sig>


More information about the Password-Store mailing list