1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-08 06:02:22 +03:00

The changes I have made are described in CHANGES. This was based on

diffs to 7.3-devel and may not be applicable to 7.2. I have included a
change covered by a previous bugfix patch I submitted (the problem with
-.1 not being accepted by cube_in). It does not include a fix for the
potential buffer overrun issue I reported for cube_yyerror in
cubeparse.y.


Bruno Wolff III
This commit is contained in:
Bruce Momjian
2002-08-29 23:03:58 +00:00
parent 6d27cfdd89
commit 32784cddf1
8 changed files with 696 additions and 256 deletions

View File

@@ -198,9 +198,10 @@ write_box(unsigned int dim, char *str1, char *str2)
NDBOX * bp;
char * s;
int i;
int size = offsetof(NDBOX, x[0]) + sizeof(float) * dim * 2;
int size = offsetof(NDBOX, x[0]) + sizeof(double) * dim * 2;
bp = palloc(size);
memset(bp, 0, size);
bp->size = size;
bp->dim = dim;
@@ -217,7 +218,7 @@ write_box(unsigned int dim, char *str1, char *str2)
s++; i++;
bp->x[i] = strtod(s, NULL);
}
return(bp);
}
@@ -230,9 +231,10 @@ static NDBOX * write_point_as_box(char *str)
int dim = delim_count(str, ',') + 1;
char * s = str;
size = offsetof(NDBOX, x[0]) + sizeof(float) * dim * 2;
size = offsetof(NDBOX, x[0]) + sizeof(double) * dim * 2;
bp = palloc(size);
memset(bp, 0, size);
bp->size = size;
bp->dim = dim;