We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents c171a2a + d39d5c7 commit ccff8ccCopy full SHA for ccff8cc
ext/rugged/rugged_allocator.c
@@ -28,7 +28,7 @@ static char *rugged_gstrndup(const char *str, size_t n, const char *file, int li
28
size_t len;
29
char *newstr;
30
31
- len = strlen(str);
+ len = strnlen(str, n);
32
if (len < n)
33
n = len;
34
0 commit comments