GnuPG can't handle some V3 secret keys
Werner Koch
wk at gnupg.org
Sat May 5 19:20:02 CEST 2001
On Fri, 4 May 2001, Stefan Bellon wrote:
> I'm not sure whether I got this right. You favour writing code without
> tests for NULL as the OS should react accordingly? Or did I
> misunderstand you?
No!
If you read code written by me you will notice a lot assert()s and
similar constructs at many places even on places where you think,
this can't go wrong. It has been proven over the years that this is
a very effective way to detect logical errors.
If I do not use an assert but have doubts that other parts of the
code might rely on a freed pointer for example, I set it to NULL and
a backtrace will show you what was wrong.
IIRC, the early implementation of mpi_read() aborted on unreadable
stuff. I later changed this to return NULL but obviously didn't
fixed all callers. Frankly the parsing code used to have no good
error handling at all.
Werner
--
Werner Koch Omnis enim res, quae dando non deficit, dum habetur
g10 Code GmbH et non datur, nondum habetur, quomodo habenda est.
Privacy Solutions -- Augustinus
More information about the Gnupg-devel
mailing list