Skip to content

malformed SDF string causes segfault #27

@itdaniher

Description

@itdaniher

import chemkit
st = """ 2 1 0 0 0 0 999 V2000
... -0.4125 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
... 0.4125 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0"""
f = chemkit.MoleculeFile()
f.setFormat("sdf")
True
f.readString(st)
Segmentation fault: 11

For your copying and pasting pleasure, the string above is:

' 2 1 0 0 0 0 999 V2000\n -0.4125 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 0.4125 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions