diff --git a/c/aws-c-common/aws_string_eq_byte_buf_harness.i b/c/aws-c-common/aws_string_eq_byte_buf_harness.i index 2409f1fe18f..87ea7f60285 100644 --- a/c/aws-c-common/aws_string_eq_byte_buf_harness.i +++ b/c/aws-c-common/aws_string_eq_byte_buf_harness.i @@ -6860,7 +6860,7 @@ struct aws_string *ensure_string_is_allocated_nondet_length() { struct aws_string *ensure_string_is_allocated_bounded_length(size_t max_size) { size_t len = nondet_uint64_t(); - assume_abort_if_not(len < max_size); + assume_abort_if_not(0 < len && len < max_size); return ensure_string_is_allocated(len); } diff --git a/c/aws-c-common/aws_string_new_from_array_harness.i b/c/aws-c-common/aws_string_new_from_array_harness.i index 8e630861f92..20c602b1772 100644 --- a/c/aws-c-common/aws_string_new_from_array_harness.i +++ b/c/aws-c-common/aws_string_new_from_array_harness.i @@ -9460,10 +9460,11 @@ struct aws_string *aws_string_clone_or_reuse(struct aws_allocator *allocator, co } void aws_string_new_from_array_harness() { - size_t alloc_size; + size_t alloc_size = nondet_size_t(); + assume_abort_if_not(alloc_size > 0); uint8_t *array = bounded_malloc(alloc_size); struct aws_allocator *allocator = can_fail_allocator(); - size_t reported_size; + size_t reported_size = nondet_size_t(); assume_abort_if_not(reported_size <= alloc_size);