From f7c86861105b6e09d4cdc2b7c1d9e4203b2e65f6 Mon Sep 17 00:00:00 2001 From: bx Date: Mon, 27 Dec 2021 08:17:19 +0000 Subject: [PATCH] commented out some debug prints --- fillin.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/fillin.c b/fillin.c index b8126aa..f176e84 100644 --- a/fillin.c +++ b/fillin.c @@ -9,6 +9,13 @@ // prefix for debug prints #define SSS "-fillin-\t" +// TODO: use this to enable / disable debug prints +#if 1 +# define DBP printf +#else +# define DBP(...) +#endif + // https://refspecs.linuxbase.org/LSB_4.1.0/LSB-Core-generic/LSB-Core-generic/libc---strcpy-chk-1.html // TODO: actually check for overflows char * __strcpy_chk(char * dest, const char * src, size_t destlen) { @@ -28,7 +35,7 @@ char * __strcpy_chk(char * dest, const char * src, size_t destlen) { // https://refspecs.linuxbase.org/LSB_4.1.0/LSB-Core-generic/LSB-Core-generic/libc---stpcpy-chk-1.html char * __stpcpy_chk(char * dest, const char * src, size_t destlen) { - printf(SSS "STPCPY %s :::: %s\n", src, dest); + // printf(SSS "STPCPY %s :::: %s\n", src, dest); return stpcpy(dest, src); } @@ -36,7 +43,7 @@ char * __stpcpy_chk(char * dest, const char * src, size_t destlen) { // https://refspecs.linuxbase.org/LSB_4.1.0/LSB-Core-generic/LSB-Core-generic/libc---strncpy-chk-1.html char * __strncpy_chk(char * dest, const char * src, size_t n, size_t dest_1len) { - printf(SSS "STRNCPY %s :::: %s\n", src, dest); + // printf(SSS "STRNCPY %s :::: %s\n", src, dest); return strncpy(dest, src, n); } @@ -44,7 +51,7 @@ char * __strncpy_chk(char * dest, const char * src, size_t n, size_t dest_1len) // https://refspecs.linuxbase.org/LSB_4.1.0/LSB-Core-generic/LSB-Core-generic/libc---strcat-chk-1.html // TODO: There's some good info being dumped here char * __strcat_chk(char * dest, const char * src, size_t destlen) { - printf("!!! strcat %s :::: %s\n", src, dest); + // printf("!!! strcat %s :::: %s\n", src, dest); char *res = strncat(dest, src, destlen); @@ -62,7 +69,7 @@ void * __memcpy_chk(void * dest, const void * src, size_t len, size_t destlen) { // https://refspecs.linuxbase.org/LSB_4.1.0/LSB-Core-generic/LSB-Core-generic/libc---memset-chk-1.html void * __memset_chk(void * dest, int c, size_t len, size_t destlen) { - puts(SSS "MEMSET\n"); + // puts(SSS "MEMSET\n"); return memset(dest, c, len); }