diff --git a/src/main/options.c b/src/main/options.c index b257117..d665474 100644 --- a/src/main/options.c +++ b/src/main/options.c @@ -262,6 +262,8 @@ static bool opts_watchfd_processname(opts_t opts, const char *process_name) /* Read the lines of output from the child process. */ + /* TODO: use getdelim() instead of fgets() to eliminate fixed buffers. */ + ok = true; memset(buffer, 0, sizeof(buffer)); while ((0 == feof(fptr)) && (NULL != fgets(buffer, (int) (sizeof(buffer) - 1), fptr))) { @@ -329,6 +331,8 @@ static bool opts_watchfd_listfile(opts_t opts, const char *filename) return false; } + /* TODO: use getdelim() instead of fgets() to eliminate fixed buffers. */ + linenumber = 0; memset(buffer, 0, sizeof(buffer));