Uploaded image for project: 'PHP Driver: Extension'
  1. PHP Driver: Extension
  2. PHPC-724

Regex constructor should throw if pattern or flags contain null bytes

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.2.0-alpha1, 1.2.0
    • Affects Version/s: 1.1.8
    • Component/s: None
    • None

      BSON's regex type uses null-terminated strings for pattern and flag components. Since values would be truncated by libbson, which uses strlen() internally, we should throw if either argument contains a null byte.

            Assignee:
            jmikola@mongodb.com Jeremy Mikola
            Reporter:
            jmikola@mongodb.com Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: