aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--src/pj_apply_gridshift.c6
2 files changed, 11 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 88094d5d..dbad6cb2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2001-03-15 Frank Warmerdam <warmerdam@pobox.com>
+
+ * src/pj_apply_gridshift.c: fixed bug in pj_load_nadgrids() which
+ would sometimes result in the load function failing because of a
+ buffer overrun in the grid list string.
+
2001-03-14 Frank Warmerdam <warmerdam@pobox.com>
* added nad/epsg database of translations between EPSG PCS/GCS
diff --git a/src/pj_apply_gridshift.c b/src/pj_apply_gridshift.c
index 0f7e39a6..5a9232b7 100644
--- a/src/pj_apply_gridshift.c
+++ b/src/pj_apply_gridshift.c
@@ -31,6 +31,9 @@
******************************************************************************
*
* $Log$
+ * Revision 1.2 2001/03/15 16:57:55 warmerda
+ * fixed intermittent problem in pj_load_nadgrids()
+ *
* Revision 1.1 2000/07/06 23:32:27 warmerda
* New
*
@@ -187,7 +190,7 @@ static struct CTABLE **pj_load_nadgrids( const char *nadgrids )
/* -------------------------------------------------------------------- */
/* Loop processing names out of nadgrids one at a time. */
/* -------------------------------------------------------------------- */
- for( s = nadgrids; *s != '\0'; s++ )
+ for( s = nadgrids; *s != '\0'; )
{
int end_char;
char name[128];
@@ -209,6 +212,7 @@ static struct CTABLE **pj_load_nadgrids( const char *nadgrids )
if( *s == ',' )
s++;
+
last_nadgrids_list[nadgrids_count] = pj_get_grid( name );
if( last_nadgrids_list[nadgrids_count] == NULL )
return NULL;