Title: Null pointer dereference in ndb.ndbm get when used with a default value.
Type: crash Stage: resolved
Components: Versions: Python 3.8, Python 3.7, Python 3.6, Python 3.5
Status: closed Resolution: duplicate
Dependencies: Superseder: Crash in the get() method a single argument in dbm.ndbm
View: 33383
Assigned To: Nosy List: serhiy.storchaka, tmiasko
Priority: normal Keywords: patch

Created on 2017-10-25 10:25 by tmiasko, last changed 2018-05-20 23:20 by serhiy.storchaka. This issue is now closed.

File name Uploaded Description Edit
0001-Fix-null-pointer-dereference-in-dbm.ndbm-get.patch tmiasko, 2017-10-25 10:25 [PATCH] Fix null pointer dereference in dbm.ndbm get. review
Messages (3)
msg304977 - (view) Author: Tomasz Mi─ůsko (tmiasko) Date: 2017-10-25 10:25
Using ndb.ndbm get when key is missing and default value has to be returned
results in invocation of Py_INCREF on null pointer. Test case to reproduce the issue:

import dbm.ndbm

with'db', 'n') as db:
msg304980 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2017-10-25 11:58
Could you please create a pull request on GitHub Tomasz?
msg317209 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2018-05-20 23:20
I forgot about this issue and have fixed this bug in a new issue33383.
Date User Action Args
2018-05-20 23:20:54serhiy.storchakasetstatus: open -> closed
superseder: Crash in the get() method a single argument in dbm.ndbm
messages: + msg317209

resolution: duplicate
stage: resolved
2017-10-25 11:58:41serhiy.storchakasetnosy: + serhiy.storchaka
messages: + msg304980
2017-10-25 10:25:18tmiaskocreate