aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/gie.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gie.c b/src/gie.c
index bf7d2416..1e362181 100644
--- a/src/gie.c
+++ b/src/gie.c
@@ -170,8 +170,10 @@ static const char *err_const_from_errno (int err);
#define SKIP -1
+#define MAX_OPERATION 10000
+
typedef struct {
- char operation[10000];
+ char operation[MAX_OPERATION+1];
PJ *P;
PJ_COORD a, b, c, e;
PJ_DIRECTION dir;
@@ -557,7 +559,8 @@ either a conversion or a transformation)
T.operation_lineno = F->lineno;
- strcpy (&(T.operation[0]), F->args);
+ strncpy (&(T.operation[0]), F->args, MAX_OPERATION);
+ T.operation[MAX_OPERATION] = '\0';
if (T.verbosity > 1) {
finish_previous_operation (F->args);