Merge "Add a regression test for a fixed strnlen bug."
This commit is contained in:
commit
4955cde2c5
@ -22,6 +22,7 @@
|
||||
#include <gtest/gtest.h>
|
||||
#include <malloc.h>
|
||||
#include <math.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "buffer_tests.h"
|
||||
|
||||
@ -1396,6 +1397,10 @@ TEST(string, strnlen_147048) {
|
||||
delete[] heap_src;
|
||||
}
|
||||
|
||||
TEST(string, strnlen_74741) {
|
||||
ASSERT_EQ(4U, strnlen("test", SIZE_MAX));
|
||||
}
|
||||
|
||||
TEST(string, mempcpy) {
|
||||
char dst[6];
|
||||
ASSERT_EQ(&dst[4], reinterpret_cast<char*>(mempcpy(dst, "hello", 4)));
|
||||
|
Loading…
Reference in New Issue
Block a user