···151151 return __underlying_strncpy(p, q, size);152152}153153154154-/**155155- * strcat - Append a string to an existing string156156- *157157- * @p: pointer to NUL-terminated string to append to158158- * @q: pointer to NUL-terminated source string to append from159159- *160160- * Do not use this function. While FORTIFY_SOURCE tries to avoid161161- * read and write overflows, this is only possible when the162162- * destination buffer size is known to the compiler. Prefer163163- * building the string with formatting, via scnprintf() or similar.164164- * At the very least, use strncat().165165- *166166- * Returns @p.167167- *168168- */169169-__FORTIFY_INLINE __diagnose_as(__builtin_strcat, 1, 2)170170-char *strcat(char * const POS p, const char *q)171171-{172172- const size_t p_size = __member_size(p);173173-174174- if (p_size == SIZE_MAX)175175- return __underlying_strcat(p, q);176176- if (strlcat(p, q, p_size) >= p_size)177177- fortify_panic(__func__);178178- return p;179179-}180180-181154extern __kernel_size_t __real_strnlen(const char *, __kernel_size_t) __RENAME(strnlen);182155/**183156 * strnlen - Return bounded count of characters in a NUL-terminated string···406433 p[actual] = '\0';407434408435 return wanted;436436+}437437+438438+/* Defined after fortified strlcat() to reuse it. */439439+/**440440+ * strcat - Append a string to an existing string441441+ *442442+ * @p: pointer to NUL-terminated string to append to443443+ * @q: pointer to NUL-terminated source string to append from444444+ *445445+ * Do not use this function. While FORTIFY_SOURCE tries to avoid446446+ * read and write overflows, this is only possible when the447447+ * destination buffer size is known to the compiler. Prefer448448+ * building the string with formatting, via scnprintf() or similar.449449+ * At the very least, use strncat().450450+ *451451+ * Returns @p.452452+ *453453+ */454454+__FORTIFY_INLINE __diagnose_as(__builtin_strcat, 1, 2)455455+char *strcat(char * const POS p, const char *q)456456+{457457+ const size_t p_size = __member_size(p);458458+459459+ if (strlcat(p, q, p_size) >= p_size)460460+ fortify_panic(__func__);461461+ return p;409462}410463411464/**