The referenced commit used size_t as a return value for
snprintf.
Coverity found the negative check against size_t but the real
problem was using size_t in the first place as an error
returned by snprintf would never be detected.
References:
commit
5e510d1c9ed8cb61f9c504076a7c4828624b8b07
Coverity #288526
FILE *file;
char *thread_comm, *endcomm, *threadname;
char *path = NULL;
- size_t len = 0;
- int nbytes;
+ int len, nbytes;
char readbuf[BUFSIZ + 1];
if (! (threadname = malloc(COMM_LEN + 2 + 1))) {