Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8354453

Don't strcpy in os::strdup, use memcpy instead

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 25
    • None
    • hotspot
    • b21

      Since the length is known from a strlen, memcpy can be used instead of strcpy. This avoids two passes over the string to find the terminating NUL character.

            aartemov Anton Artemov
            jsjolen Johan Sjölen
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: