summaryrefslogtreecommitdiff
path: root/src/bin/jp2/convert.c
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2021-06-07 13:28:26 +0200
committerEven Rouault <even.rouault@spatialys.com>2021-06-07 13:28:26 +0200
commitf0629cb1c4c485d905936413556deb2872ac51e5 (patch)
tree9aea6f5acfc2834e888e60283df481897c2d9c0a /src/bin/jp2/convert.c
parent7e4e09a7fb2ee0de857227771b22abff54448cd4 (diff)
Fix various compiler warnings
Diffstat (limited to 'src/bin/jp2/convert.c')
-rw-r--r--src/bin/jp2/convert.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bin/jp2/convert.c b/src/bin/jp2/convert.c
index 23f820c0..7610e245 100644
--- a/src/bin/jp2/convert.c
+++ b/src/bin/jp2/convert.c
@@ -1384,7 +1384,7 @@ int imagetopgx(opj_image_t * image, const char *outfile)
goto fin;
}
}
- strncpy(name, outfile, dotpos);
+ memcpy(name, outfile, dotpos);
sprintf(name + dotpos, "_%u.pgx", compno);
fdest = fopen(name, "wb");
/* don't need name anymore */
@@ -2228,7 +2228,7 @@ int imagetopnm(opj_image_t * image, const char *outfile, int force_split)
const size_t olen = strlen(outfile);
const size_t dotpos = olen - 4;
- strncpy(destname, outfile, dotpos);
+ memcpy(destname, outfile, dotpos);
sprintf(destname + dotpos, "_%u.pgm", compno);
} else {
sprintf(destname, "%s", outfile);