Uploaded image for project: 'PHP Legacy Driver'
  1. PHP Legacy Driver
  2. PHP-1494

We don't allocate enough space for the hash buffer

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 1.6.6, 1.6.11
    • Fix Version/s: 1.6.12
    • Component/s: pecl-mongo
    • Labels:
      None
    • # Replies:
      4
    • Last comment by Customer:
      true
    • Sprint:
      PHP Sprint 26

      Description

      A user on IRC contacted me to say they have a crash. After him being very helpful during a live debugging I figured out that we fail to allocate space for the "-;" and ".;" in the hash in the cases there is no replset name, or username/password/db combination. That combined with a PID that is more than 5 characters (we reserve 10 for it), caused a valgrind warning because there was not enough space for the "\0" any more.

        Attachments

          Activity

            People

            Assignee:
            derick Derick Rethans
            Reporter:
            derick Derick Rethans
            Participants:
            Last commenter:
            Rathi Gnanasekaran
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since reply:
              4 years, 39 weeks, 6 days ago
              Date of 1st Reply: