From adb0acbaf50c17882e51e95150318ddce9cc02d3 Mon Sep 17 00:00:00 2001 From: Jon Trulson Date: Sun, 1 Apr 2018 13:45:48 -0600 Subject: [PATCH] dtudcfonted/getfname.c: coverity CID 86392; insecure readlink --- cde/programs/dtudcfonted/libfuty/getfname.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cde/programs/dtudcfonted/libfuty/getfname.c b/cde/programs/dtudcfonted/libfuty/getfname.c index 0193989b..a25c757d 100644 --- a/cde/programs/dtudcfonted/libfuty/getfname.c +++ b/cde/programs/dtudcfonted/libfuty/getfname.c @@ -733,7 +733,7 @@ char *name; return NULL; } } - link_name[len] = '\0'; + link_name[len-1] = 0; if ( link_name[0] == '/' ) { /* strcpy( ret_name, link_name ) ; */ FreeString( ret_name ) ; -- 2.25.1