{"issue":{"milestone":null,"title":"Using the safe strcpy_s. The 'num' parameter is the size of the 'buf' array.","created_at":"2012-01-01T00:14:14Z","user":{"id":5177,"login":"evanlong","url":"https://api.github.com/users/evanlong","avatar_url":"https://secure.gravatar.com/avatar/696bc92ea0e14f9e62c459e230bf0f61?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"696bc92ea0e14f9e62c459e230bf0f61"},"labels":[],"updated_at":"2012-01-01T01:01:11Z","state":"open","id":2696145,"html_url":"https://github.com/mongodb/mongo/issues/157","closed_at":null,"pull_request":{"patch_url":"https://github.com/mongodb/mongo/pull/157.patch","html_url":"https://github.com/mongodb/mongo/pull/157","diff_url":"https://github.com/mongodb/mongo/pull/157.diff"},"body":"This will help protect against buffer overflow and/or heap corruption.","number":157,"url":"https://api.github.com/repos/mongodb/mongo/issues/157","comments":3,"assignee":null},"comment":{"created_at":"2012-01-01T01:01:11Z","user":{"id":5177,"login":"evanlong","url":"https://api.github.com/users/evanlong","avatar_url":"https://secure.gravatar.com/avatar/696bc92ea0e14f9e62c459e230bf0f61?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"696bc92ea0e14f9e62c459e230bf0f61"},"updated_at":"2012-01-01T01:01:11Z","id":3323475,"body":"strncpy is problematic because it is easy to mess up and not '\\0' terminate the destination. strcpy_s makes sure the src length is less than the size of the destination buffer and then copies it with strcpy which copies the '\\0'. As a result dest should be '\\0' terminated.","url":"https://api.github.com/repos/mongodb/mongo/issues/comments/3323475"},"action":"created"}