aboutsummaryrefslogtreecommitdiff
path: root/src/pj_apply_gridshift.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pj_apply_gridshift.c')
-rw-r--r--src/pj_apply_gridshift.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pj_apply_gridshift.c b/src/pj_apply_gridshift.c
index 45887abd..7d9ac94b 100644
--- a/src/pj_apply_gridshift.c
+++ b/src/pj_apply_gridshift.c
@@ -273,7 +273,7 @@ int proj_hgrid_init(PJ* P, const char *grids) {
***********************************************/
/* prepend "s" to the "grids" string to allow usage with pj_param */
- char *sgrids = (char *) pj_malloc( (strlen(grids)+1) *sizeof(char) );
+ char *sgrids = (char *) pj_malloc( (strlen(grids)+1+1) *sizeof(char) );
sprintf(sgrids, "%s%s", "s", grids);
if (P->gridlist == NULL) {