Skip to content

Commit

Permalink
fix: tmpGeometry format
Browse files Browse the repository at this point in the history
  • Loading branch information
DuanKuanJun committed Jun 13, 2024
1 parent 5ebe168 commit 5e2929a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/benchData.c
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@ int tmpGeometry(char *tmp, int iface, Field *field, int64_t k) {

int32_t pos = snprintf(tmp, field->length, "LINESTRING(");
for(int32_t i = 0; i < cnt; i++) {
pos = snprintf(tmp + pos, field->length - pos, "%d %d", tmpUint16(field), tmpUint16(field));
pos += snprintf(tmp + pos, field->length - pos, "%d %d", tmpUint16(field), tmpUint16(field));

Check failure

Code scanning / CodeQL

Potentially overflowing call to snprintf High

The
size argument
of this snprintf call is derived from its return value, which may exceed the size of the buffer and overflow.
}
strcat(tmp, ")");

Expand Down

0 comments on commit 5e2929a

Please sign in to comment.