Skip to content

Commit

Permalink
check endpoint size
Browse files Browse the repository at this point in the history
  • Loading branch information
cirospaciari committed Jan 7, 2025
1 parent 2e56848 commit db0dfb4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/s3/credentials.zig
Original file line number Diff line number Diff line change
Expand Up @@ -556,6 +556,7 @@ pub const S3Credentials = struct {
// detect service name and host from region or endpoint
const host = brk_host: {
if (this.endpoint.len > 0) {
if (this.endpoint.len >= 512) return error.InvalidEndpoint;
break :brk_host try bun.default_allocator.dupe(u8, this.endpoint);
} else {
break :brk_host try std.fmt.allocPrint(bun.default_allocator, "s3.{s}.amazonaws.com", .{region});
Expand Down

0 comments on commit db0dfb4

Please sign in to comment.