Skip to content

Commit

Permalink
\0 after strncpy()
Browse files Browse the repository at this point in the history
  • Loading branch information
AbelPau committed Apr 4, 2024
1 parent 49623c0 commit 8e976f6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions ogr/ogrsf_frmts/miramon/mm_gdal_functions.c
Original file line number Diff line number Diff line change
Expand Up @@ -617,6 +617,7 @@ static char *MM_SetSubIndexFieldNam(const char *nom_camp,
return nullptr;

strncpy(NomCamp_SubIndex, nom_camp, ampladamax);
NomCamp_SubIndex[ampladamax - 1] = '\0';

snprintf(subindex, sizeof(subindex), sprintf_UINT64, (GUInt64)index);

Expand Down

0 comments on commit 8e976f6

Please sign in to comment.