mod_python
  1. mod_python
  2. MODPYTHON-185

_psp.parsestring doesn't check for empty values

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.3.1
    • Component/s: psp
    • Labels:
      None
    • Environment:
      All

      Description

      The function _psp_module_parsestring of _pspmodule.c doesn't check the value of parser->pycode.blob when calling PyString_FromString (whereas it's done in _psp_module_parse). When called with an empty string it can cause a segfault (blob is NULL and PyString_FromString doesn't check for NULL value).

      I attach a simple diff correcting the problem.

        Activity

        Thomas Hervé created issue -
        Jim Gallacher made changes -
        Field Original Value New Value
        Assignee Jim Gallacher [ jgallacher ]
        Jim Gallacher made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        Jim Gallacher made changes -
        Status In Progress [ 3 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Fix Version/s 3.3 [ 12310101 ]
        Graham Dumpleton made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Jim Gallacher
            Reporter:
            Thomas Hervé
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development