1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-29 08:01:23 +03:00

Fix excess memory usage in the JSON parser of GEOPOLY.

FossilOrigin-Name: 9057e27e12ded07a9ea0b2868036d3019f7bc5be3a67e3d341f56b762d3de9d9
This commit is contained in:
drh
2018-09-06 11:14:17 +00:00
parent 9a09b7b31d
commit a83a74c428
3 changed files with 8 additions and 8 deletions

View File

@ -204,7 +204,7 @@ static GeoPoly *geopolyParseJson(const unsigned char *z, int *pRc){
int ii = 0;
char c;
s.z++;
if( s.nVertex<=s.nAlloc ){
if( s.nVertex>=s.nAlloc ){
GeoCoord *aNew;
s.nAlloc = s.nAlloc*2 + 16;
aNew = sqlite3_realloc64(s.a, s.nAlloc*sizeof(GeoCoord)*2 );