Skip to content

Commit

Permalink
Use snprintf() to make Coverity not report a false positive potential…
Browse files Browse the repository at this point in the history
… buffer overflow (KS CID 164968)

git-svn-id: https://svn.osgeo.org/gdal/trunk@34757 f0d54148-0727-0410-94bb-9a71ac55c965
  • Loading branch information
rouault committed Jul 22, 2016
1 parent f958edc commit 9b4cfdd
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions gdal/port/cpl_vsil_curl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2249,9 +2249,7 @@ static bool VSICurlParseHTMLDateTimeFileSize(const char* pszStr,
}

/* Microsoft IIS */
szMonth[0] = ' ';
strcpy(szMonth + 1, apszMonths[iMonth]);
strcat(szMonth, " ");
snprintf( szMonth, sizeof(szMonth), " %s ", apszMonths[iMonth] );
pszMonthFound = strstr(pszStr, szMonth);
if (pszMonthFound)
{
Expand Down

0 comments on commit 9b4cfdd

Please sign in to comment.