Skip to content

Commit

Permalink
fix(object_domain): 63 instead of 64 for null terminator
Browse files Browse the repository at this point in the history
  • Loading branch information
vimkim authored Jan 9, 2025
1 parent 7f48ac9 commit fe70164
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/object/object_domain.c
Original file line number Diff line number Diff line change
Expand Up @@ -5049,7 +5049,7 @@ tp_str_to_vector (const DB_VALUE * src, DB_VALUE * result)

// Get number into buffer
buffer_idx = 0;
while (p < end && *p != ',' && *p != ']' && buffer_idx < number_buffer_size)
while (p < end && *p != ',' && *p != ']' && buffer_idx < number_buffer_size - 1)
{
if (!isspace (*p))
{
Expand All @@ -5058,7 +5058,7 @@ tp_str_to_vector (const DB_VALUE * src, DB_VALUE * result)
p++;
}

if (buffer_idx == 0 || buffer_idx >= number_buffer_size)
if (buffer_idx == 0 || buffer_idx >= number_buffer_size - 1)
{

return ER_FAILED;
Expand Down

0 comments on commit fe70164

Please sign in to comment.