Browse Source

Ensure environment array is NULL-terminated

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@40709 15284696-431f-4ddb-bdfa-cd5b030d7da7
Glynn Clements 15 years ago
parent
commit
aa90c6079e
1 changed files with 2 additions and 0 deletions
  1. 2 0
      lib/gis/spawn.c

+ 2 - 0
lib/gis/spawn.c

@@ -472,6 +472,8 @@ static const char **do_bindings(const struct binding *bindings, int num_bindings
     for (i = 0; i < num_bindings; i++)
 	add_binding(newenv, &n, &bindings[i]);
 
+    newenv[num_bindings + n] = NULL;
+
     return newenv;
 }