Re: [PATCH 4/7] util/crypto: _n_m_crypto_potential_payload returns whether part is the payload

Subject: Re: [PATCH 4/7] util/crypto: _n_m_crypto_potential_payload returns whether part is the payload

Date: Wed, 31 Jul 2019 23:29:21 -0400

To: David Bremner, Notmuch Mail

Cc:

From: Daniel Kahn Gillmor


On Wed 2019-07-31 23:15:55 -0400, Daniel Kahn Gillmor wrote:
> On Wed 2019-07-31 08:57:56 -0300, David Bremner wrote:
>> what about leaving an assert or call to INTERNAL_ERROR here? I'm a bit
>> concerned this change is making the code less robust. I guess we'll see
>> a segfault, if either is NULL, but that seems bit icky to rely on.
>
> Sure, INTERNAL_ERROR makes sense, i think.

hm, INTERNAL_ERROR is only a valid symbol within libnotmuch, and
util/crypto.o is *not* within libnotmuch.  So i think i'll use assert,
by analogy with hex_encode() in util/hex_encode.c.  let me know if you
think that's a bad idea for some reason.

   --dkg
signature.asc (application/pgp-signature)
_______________________________________________
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch

Thread: