diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index eff75483f..9e2f3c2f1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,9 +6,9 @@ on: - 'main' env: - BUILDER_VERSION: v0.9.55 + BUILDER_VERSION: clang_path BUILDER_HOST: https://d19elf31gohf1l.cloudfront.net - BUILDER_SOURCE: releases + BUILDER_SOURCE: channels PACKAGE_NAME: aws-c-common LINUX_BASE_IMAGE: ubuntu-18-x64 RUN: ${{ github.run_id }}-${{ github.run_number }} diff --git a/source/string.c b/source/string.c index 2fd791230..8e1c8a259 100644 --- a/source/string.c +++ b/source/string.c @@ -190,7 +190,8 @@ struct aws_string *aws_string_new_from_array(struct aws_allocator *allocator, co AWS_PRECONDITION(allocator); AWS_PRECONDITION(AWS_MEM_IS_READABLE(bytes, len)); - struct aws_string *str = aws_mem_acquire(allocator, offsetof(struct aws_string, bytes[len + 1])); + struct aws_string *str = + aws_mem_acquire(allocator, offsetof(struct aws_string, bytes) + (len + 1) * sizeof(uint8_t)); if (!str) { return NULL; }