Skip to content

Commit 3be56c8

Browse files
committed
Merge pull request #302 from jeroenooms/strnlen-fix
use bson_strnlen when strnlen is not available
2 parents 5cc566e + a252f20 commit 3be56c8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/mongoc/mongoc-cursor.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ _mongoc_cursor_new (mongoc_client_t *client,
104104
cursor->client = client;
105105
bson_strncpy (cursor->ns, db_and_collection, sizeof cursor->ns);
106106

107-
cursor->nslen = (uint32_t)strnlen (cursor->ns, sizeof cursor->ns);
107+
cursor->nslen = (uint32_t)bson_strnlen (cursor->ns, sizeof cursor->ns);
108108
dot = strstr (db_and_collection, ".");
109109

110110
if (dot) {

0 commit comments

Comments
 (0)