arm-trusted-firmware/lib/libc/libc_common.mk
Jit Loon Lim eb088894dc feat(lib): implement strnlen secure and strcpy secure function
Implement safer version of 'strnlen' function
to handle NULL terminated strings with additional
bound checking and secure version of string copy function
to support better security and avoid destination
buffer overflow.

Change-Id: I93916f003b192c1c6da6a4f78a627c8885db11d9
Signed-off-by: Jit Loon Lim <jit.loon.lim@altera.com>
Signed-off-by: Girisha Dengi <girisha.dengi@intel.com>
2025-03-19 12:57:35 +08:00

45 lines
808 B
Makefile

#
# Copyright (c) 2024-2025, Arm Limited and Contributors. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
LIBC_SRCS := $(addprefix lib/libc/, \
abort.c \
assert.c \
exit.c \
memchr.c \
memcmp.c \
memcpy.c \
memcpy_s.c \
memmove.c \
memrchr.c \
printf.c \
putchar.c \
puts.c \
qsort.c \
snprintf.c \
strchr.c \
strcmp.c \
strcpy_secure.c \
strlcat.c \
strlcpy.c \
strlen.c \
strnlen_secure.c \
strncmp.c \
strnlen.c \
strrchr.c \
strtok.c \
strtoul.c \
strtoll.c \
strtoull.c \
strtol.c)
ifeq (${ARCH},aarch64)
LIBC_SRCS += $(addprefix lib/libc/aarch64/, \
setjmp.S)
endif
INCLUDES += -Iinclude/lib/libc \
-Iinclude/lib/libc/$(ARCH) \