diff options
author | Jukka Jylänki <jujjyl@gmail.com> | 2014-03-25 13:06:43 -0700 |
---|---|---|
committer | Jukka Jylänki <jujjyl@gmail.com> | 2014-03-28 23:06:17 -0400 |
commit | a019e4e65cbdb0a075110db09c54bb34e544c7e3 (patch) | |
tree | ccfc5c0fc1fef18a02ad84641abe7b5aaa895756 /tests | |
parent | 64300b2ea56bfe6f09f855cfd7f7f6d99ec39bfe (diff) |
Fix test_strndup. The signature of strndup takes in a size_t for length, so passing -1 is equivalent to passing 0xFFFFFFFF, which means the whole string will get duplicated, and the old handwritten implementation had a bug.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/core/test_strndup.out | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/core/test_strndup.out b/tests/core/test_strndup.out index 681f00cc..f86db64e 100644 --- a/tests/core/test_strndup.out +++ b/tests/core/test_strndup.out @@ -3,4 +3,4 @@ 3:strndup - duplicate a specific number of bytes from a string 4:strndup - duplicate a specific number of bytes from a string 5:strndup - duplicate -6: +6:strndup - duplicate a specific number of bytes from a string |