chiark / gitweb /
utils.c: Raise exceptions from `convTHING' with null arguments.
authorMark Wooding <mdw@distorted.org.uk>
Thu, 11 May 2017 09:42:15 +0000 (10:42 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Sat, 13 May 2017 14:42:21 +0000 (15:42 +0100)
commit8c45178c90702f4ca299ce942804bfed11b2345f
tree0310329f7046931bcc95c8a75344ba1486688f65
parent5779eaf1c6c738aac2227dcadb9e8c27ca22631e
utils.c: Raise exceptions from `convTHING' with null arguments.

This can happen as a result of using `convTHING' in an attribute `set'
function, and the Python program trying to `del' the attribute.
Unfortunately, these conversion functions are already being used in this
context, and it leads to segfaults, e.g., from

  del C.Key(C.KeyFile('', C.KOPEN_WRITE | C.KOPEN_NOFILE), 0, 'k').exptime

Easy fix.
util.c