X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?p=o-du%2Fphy.git;a=blobdiff_plain;f=fhi_lib%2Flib%2Fsrc%2Fxran_sync_api.c;fp=fhi_lib%2Flib%2Fsrc%2Fxran_sync_api.c;h=71c2b16af7d008c0c10e215a5fcd072c6469a1e4;hp=c45d83cbf5674f219123bb60ed5a97a8d1aa58b9;hb=2de97529a4c5a1922214ba0e6f0fb84cacbd0bc7;hpb=81a09690b36b3a4e89b4dae34f30933de13f7f90 diff --git a/fhi_lib/lib/src/xran_sync_api.c b/fhi_lib/lib/src/xran_sync_api.c index c45d83c..71c2b16 100644 --- a/fhi_lib/lib/src/xran_sync_api.c +++ b/fhi_lib/lib/src/xran_sync_api.c @@ -1,6 +1,6 @@ /****************************************************************************** * -* Copyright (c) 2019 Intel. +* Copyright (c) 2020 Intel. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -71,7 +71,7 @@ static int is_process_running(char *pname) long pid = atol(entry->d_name); if (0 == pid) continue; - sprintf(full_path, "%s/%ld/%s", PROC_DIR, pid, COMM_FILE); + snprintf(full_path, sizeof(full_path), "%s/%ld/%s", PROC_DIR, pid, COMM_FILE); FILE *proc_name_file = fopen(full_path, "r"); if (NULL == proc_name_file) continue;