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

Buffer not null terminated

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 0.1.4
    • Affects Version/s: 0.1.3
    • Component/s: None
    • None

      656                        } else if (BSON_ITER_IS_KEY (&child, "ns")) {
      657                                const char *ns;
      658
      659                                ns = bson_iter_utf8 (&child, &cursor->nslen);
         
      CID 49589 (#1 of 1): Buffer not null terminated (BUFFER_SIZE_WARNING)18. buffer_size_warning: Calling strncpy with a maximum size argument of 140 bytes on destination array cursor->ns of size 140 bytes might leave the destination string unterminated.
      660                                strncpy (cursor->ns, ns, sizeof cursor->ns);
         
      19. Falling through to end of if statement
         
      24. Condition 0 == strcmp("firstBatch", bson_iter_key(&child)), taking true branch
      

            Assignee:
            bjori Hannes Magnusson
            Reporter:
            bjori Hannes Magnusson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: