Skip to content

Commit

Permalink
Eliminate potential buffer overflow
Browse files Browse the repository at this point in the history
I realize strncat is being eliminated, but in case the elimination isn't done prior to release, this patch should be applied.
  • Loading branch information
gsjaardema authored Jan 11, 2018
1 parent 2281f3e commit cdec707
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libdispatch/dutil.c
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ NC_mktmp(const char* base)
cvtpath = NCpathcvt(base);
strncpy(tmp,cvtpath,sizeof(tmp));
nullfree(cvtpath);
strncat(tmp, "XXXXXX", sizeof(tmp));
strncat(tmp, "XXXXXX", sizeof(tmp) - strlen(tmp) - 1);

#ifdef HAVE_MKSTEMP
/* Note Potential problem: old versions of this function
Expand Down

0 comments on commit cdec707

Please sign in to comment.