[New-bugs-announce] [issue31868] Null pointer dereference in ndb.ndbm get when used with a default value.

Tomasz Miąsko report at bugs.python.org
Wed Oct 25 06:25:18 EDT 2017


New submission from Tomasz Miąsko <tomasz.miasko at gmail.com>:

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 dbm.ndbm.open('db', 'n') as db:
    print(db.get('missing-key'))
```

----------
files: 0001-Fix-null-pointer-dereference-in-dbm.ndbm-get.patch
keywords: patch
messages: 304977
nosy: tmiasko
priority: normal
severity: normal
status: open
title: Null pointer dereference in ndb.ndbm get when used with a default value.
type: crash
versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8
Added file: https://bugs.python.org/file47236/0001-Fix-null-pointer-dereference-in-dbm.ndbm-get.patch

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue31868>
_______________________________________


More information about the New-bugs-announce mailing list