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>
Sun, 14 May 2017 03:29:20 +0000 (04:29 +0100)
commit8f46aec409ea4d507db00ea3bbdea81fd3cc6ed4
treec9d5e2f92e5d80e64cb2c2b88804b9201003423a
parent2a21aec7db855ea47c42ef98eb1811f01589c670
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