pgpool2.git / summary / log / commit / refs

commit    c7c12eeffd05bf03f795065e84dc51989031b024
Author:   Muhammad Usama <m.usama@gmail.com>
Date:     Tue Aug 12 14:45:21 2014 +0000

    Fix coverity issue 1111480 Copy into fixed size buffer
    replacing strcpy() with much safer and recomended call strlcpy()


src/libs/pcp/pcp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/pcp/pcp.c b/src/libs/pcp/pcp.c index db6e513c4..68f5df544 100644 --- a/src/libs/pcp/pcp.c +++ b/src/libs/pcp/pcp.c @@ -678,7 +678,7 @@ pcp_process_info(int pid, int *array_size) index = (char *) memchr(index, '\0', rsize) + 1; if (index != NULL) - strcpy(process_info[offset].connection_info->user, index); + strlcpy(process_info[offset].connection_info->user, index, SM_USER); index = (char *) memchr(index, '\0', rsize) + 1; if (index != NULL) [parent: 7e6b93a29744]