Lines Matching +full:1 +full:q

8 extern int __underlying_memcmp(const void *p, const void *q, __kernel_size_t size) __RENAME(memcmp);
9 extern void *__underlying_memcpy(void *p, const void *q, __kernel_size_t size) __RENAME(memcpy);
10 extern void *__underlying_memmove(void *p, const void *q, __kernel_size_t size) __RENAME(memmove);
12 extern char *__underlying_strcat(char *p, const char *q) __RENAME(strcat);
13 extern char *__underlying_strcpy(char *p, const char *q) __RENAME(strcpy);
15 extern char *__underlying_strncat(char *p, const char *q, __kernel_size_t count) __RENAME(strncat);
16 extern char *__underlying_strncpy(char *p, const char *q, __kernel_size_t size) __RENAME(strncpy);
30 __FORTIFY_INLINE char *strncpy(char *p, const char *q, __kernel_size_t size) in strncpy() argument
32 size_t p_size = __builtin_object_size(p, 1); in strncpy()
38 return __underlying_strncpy(p, q, size); in strncpy()
41 __FORTIFY_INLINE char *strcat(char *p, const char *q) in strcat() argument
43 size_t p_size = __builtin_object_size(p, 1); in strcat()
45 if (p_size == (size_t)-1) in strcat()
46 return __underlying_strcat(p, q); in strcat()
47 if (strlcat(p, q, p_size) >= p_size) in strcat()
55 size_t p_size = __builtin_object_size(p, 1); in strlen()
58 if (p_size == (size_t)-1 || in strlen()
59 (__builtin_constant_p(p[p_size - 1]) && p[p_size - 1] == '\0')) in strlen()
70 size_t p_size = __builtin_object_size(p, 1); in strnlen()
80 __FORTIFY_INLINE size_t strlcpy(char *p, const char *q, size_t size) in strlcpy() argument
83 size_t p_size = __builtin_object_size(p, 1); in strlcpy()
84 size_t q_size = __builtin_object_size(q, 1); in strlcpy()
86 if (p_size == (size_t)-1 && q_size == (size_t)-1) in strlcpy()
87 return __real_strlcpy(p, q, size); in strlcpy()
88 ret = strlen(q); in strlcpy()
90 size_t len = (ret >= size) ? size - 1 : ret; in strlcpy()
96 __underlying_memcpy(p, q, len); in strlcpy()
104 __FORTIFY_INLINE ssize_t strscpy(char *p, const char *q, size_t size) in strscpy() argument
108 size_t p_size = __builtin_object_size(p, 1); in strscpy()
109 size_t q_size = __builtin_object_size(q, 1); in strscpy()
111 /* If we cannot get size of p and q default to call strscpy. */ in strscpy()
112 if (p_size == (size_t) -1 && q_size == (size_t) -1) in strscpy()
113 return __real_strscpy(p, q, size); in strscpy()
123 * This call protects from read overflow, because len will default to q in strscpy()
126 len = strnlen(q, size); in strscpy()
130 * Otherwise we will copy len + 1 because of the final '\O'. in strscpy()
132 len = len == size ? size : len + 1; in strscpy()
143 * 1. Read overflow thanks to call to strnlen(). in strscpy()
146 return __real_strscpy(p, q, len); in strscpy()
150 __FORTIFY_INLINE char *strncat(char *p, const char *q, __kernel_size_t count) in strncat() argument
153 size_t p_size = __builtin_object_size(p, 1); in strncat()
154 size_t q_size = __builtin_object_size(q, 1); in strncat()
156 if (p_size == (size_t)-1 && q_size == (size_t)-1) in strncat()
157 return __underlying_strncat(p, q, count); in strncat()
159 copy_len = strnlen(q, count); in strncat()
160 if (p_size < p_len + copy_len + 1) in strncat()
162 __underlying_memcpy(p + p_len, q, copy_len); in strncat()
178 __FORTIFY_INLINE void *memcpy(void *p, const void *q, __kernel_size_t size) in memcpy() argument
181 size_t q_size = __builtin_object_size(q, 0); in memcpy()
191 return __underlying_memcpy(p, q, size); in memcpy()
194 __FORTIFY_INLINE void *memmove(void *p, const void *q, __kernel_size_t size) in memmove() argument
197 size_t q_size = __builtin_object_size(q, 0); in memmove()
207 return __underlying_memmove(p, q, size); in memmove()
222 __FORTIFY_INLINE int memcmp(const void *p, const void *q, __kernel_size_t size) in memcmp() argument
225 size_t q_size = __builtin_object_size(q, 0); in memcmp()
235 return __underlying_memcmp(p, q, size); in memcmp()
274 __FORTIFY_INLINE char *strcpy(char *p, const char *q) in strcpy() argument
276 size_t p_size = __builtin_object_size(p, 1); in strcpy()
277 size_t q_size = __builtin_object_size(q, 1); in strcpy()
280 if (p_size == (size_t)-1 && q_size == (size_t)-1) in strcpy()
281 return __underlying_strcpy(p, q); in strcpy()
282 size = strlen(q) + 1; in strcpy()
286 memcpy(p, q, size); in strcpy()