I use popen to get the output of a process, and fgets to read a line. But if the process is still running, will I get buffer overflow (line)in the fgets?

char [2048] line;
FILE *fd;

fd = popen("non-stop-program","r");
while(fgets(line, 2048, fd)) {
.. do things
}