summaryrefslogtreecommitdiffstats
path: root/gnu/usr.bin/patch/common.h
diff options
context:
space:
mode:
authorkris <kris@FreeBSD.org>2002-10-13 01:18:33 +0000
committerkris <kris@FreeBSD.org>2002-10-13 01:18:33 +0000
commitcf195c5ed6e5764ba6c19016c02d87d7ca2cc7ad (patch)
tree94b2a6549e211894e16a902fb1410169adc74a10 /gnu/usr.bin/patch/common.h
parent010f2e91710c50e9cb49dc93d4c857ddfec610e4 (diff)
downloadFreeBSD-src-cf195c5ed6e5764ba6c19016c02d87d7ca2cc7ad.zip
FreeBSD-src-cf195c5ed6e5764ba6c19016c02d87d7ca2cc7ad.tar.gz
Prevent stack-smashing buffer overflows in -D and -r options by using
buffer-safe string functions. The rest of the code is still probably unsafe. MFC after: 1 week
Diffstat (limited to 'gnu/usr.bin/patch/common.h')
-rw-r--r--gnu/usr.bin/patch/common.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/gnu/usr.bin/patch/common.h b/gnu/usr.bin/patch/common.h
index 5267e17..ed97132 100644
--- a/gnu/usr.bin/patch/common.h
+++ b/gnu/usr.bin/patch/common.h
@@ -29,9 +29,12 @@
#define Fclose (void)fclose
#define Fflush (void)fflush
#define Sprintf (void)sprintf
+#define Snprintf (void)snprintf
#define Mktemp (void)mktemp
#define Strcpy (void)strcpy
#define Strcat (void)strcat
+#define Strlcpy (void)strlcpy
+#define Strlcat (void)strlcat
/* NeXT declares malloc and realloc incompatibly from us in some of
these files. Temporarily redefine them to prevent errors. */
OpenPOWER on IntegriCloud