Merge pull request #71 from EngineeredVirus/PG-169-buffer_overrun_fix

PG-169: Fixing Server Crash
pull/72/head
Ibrar Ahmed 2021-01-20 20:21:40 +05:00 committed by GitHub
commit 04101b6597
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -949,7 +949,7 @@ static void pgss_store(uint64 queryId,
}
}
if (total_time > PGSM_RESPOSE_TIME_LOWER_BOUND + (PGSM_RESPOSE_TIME_STEP * MAX_RESPONSE_BUCKET))
e->counters.resp_calls[MAX_RESPONSE_BUCKET]++;
e->counters.resp_calls[MAX_RESPONSE_BUCKET - 1]++;
}
for (i = 0; i < application_name_len; i++)
@ -986,7 +986,7 @@ static void pgss_store(uint64 queryId,
for(i = 0; i < sqlcode_len; i++)
e->counters.error.sqlcode[i] = sqlcode[i];
for(i = 0; i < message_len; i++)
for(i = 0; i < message_len && i < ERROR_MESSAGE_LEN; i++)
e->counters.error.message[i] = message[i];
e->counters.calls[kind].rows += rows;