Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package aws-c-sdkutils for openSUSE:Factory 
checked in at 2025-05-26 18:35:20
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/aws-c-sdkutils (Old)
 and      /work/SRC/openSUSE:Factory/.aws-c-sdkutils.new.2732 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "aws-c-sdkutils"

Mon May 26 18:35:20 2025 rev:10 rq:1279746 version:0.2.4

Changes:
--------
--- /work/SRC/openSUSE:Factory/aws-c-sdkutils/aws-c-sdkutils.changes    
2025-02-06 22:06:33.568920986 +0100
+++ /work/SRC/openSUSE:Factory/.aws-c-sdkutils.new.2732/aws-c-sdkutils.changes  
2025-05-26 18:36:53.622845765 +0200
@@ -1,0 +2,7 @@
+Mon May 19 08:54:46 UTC 2025 - John Paul Adrian Glaubitz 
<adrian.glaub...@suse.com>
+
+- Update to version 0.2.4
+  * Make exports consistent by @DmitriyMusatkin in (#52)
+  * Fix double free on malformed rulesets by @DmitriyMusatkin in (#53)
+
+-------------------------------------------------------------------

Old:
----
  v0.2.3.tar.gz

New:
----
  v0.2.4.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ aws-c-sdkutils.spec ++++++
--- /var/tmp/diff_new_pack.EKSpUr/_old  2025-05-26 18:36:54.358876664 +0200
+++ /var/tmp/diff_new_pack.EKSpUr/_new  2025-05-26 18:36:54.358876664 +0200
@@ -20,7 +20,7 @@
 %define library_pkg 1_0_0
 %define library_soversion 1
 Name:           aws-c-sdkutils
-Version:        0.2.3
+Version:        0.2.4
 Release:        0
 Summary:        AWS C SDK Utils
 License:        Apache-2.0

++++++ v0.2.3.tar.gz -> v0.2.4.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/aws-c-sdkutils-0.2.3/include/aws/sdkutils/endpoints_rule_engine.h 
new/aws-c-sdkutils-0.2.4/include/aws/sdkutils/endpoints_rule_engine.h
--- old/aws-c-sdkutils-0.2.3/include/aws/sdkutils/endpoints_rule_engine.h       
2025-01-29 00:10:58.000000000 +0100
+++ new/aws-c-sdkutils-0.2.4/include/aws/sdkutils/endpoints_rule_engine.h       
2025-05-15 01:32:49.000000000 +0200
@@ -30,6 +30,12 @@
 
 AWS_SDKUTILS_API struct aws_byte_cursor 
aws_endpoints_get_supported_ruleset_version(void);
 
+/**
+ * Warning: The following helpers are intended for use by SDKs that validate 
correctness of the ruleset at compile time.
+ * The engine sanity checks the provided ruleset, but does not do extensive 
checking.
+ * Some malformed rulesets might fail in unexpected ways.
+ */
+
 /*
 ******************************
 * Parameter
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/aws-c-sdkutils-0.2.3/include/aws/sdkutils/exports.h 
new/aws-c-sdkutils-0.2.4/include/aws/sdkutils/exports.h
--- old/aws-c-sdkutils-0.2.3/include/aws/sdkutils/exports.h     2025-01-29 
00:10:58.000000000 +0100
+++ new/aws-c-sdkutils-0.2.4/include/aws/sdkutils/exports.h     2025-05-15 
01:32:49.000000000 +0200
@@ -6,7 +6,7 @@
  * SPDX-License-Identifier: Apache-2.0.
  */
 
-#if defined(USE_WINDOWS_DLL_SEMANTICS) || defined(WIN32)
+#if defined(AWS_CRT_USE_WINDOWS_DLL_SEMANTICS) || defined(_WIN32)
 #    ifdef AWS_SDKUTILS_USE_IMPORT_EXPORT
 #        ifdef AWS_SDKUTILS_EXPORTS
 #            define AWS_SDKUTILS_API __declspec(dllexport)
@@ -18,13 +18,12 @@
 #    endif /*USE_IMPORT_EXPORT */
 
 #else
-#    if ((__GNUC__ >= 4) || defined(__clang__)) && 
defined(AWS_SDKUTILS_USE_IMPORT_EXPORT) &&                          \
-        defined(AWS_SDKUTILS_EXPORTS)
+#    if defined(AWS_SDKUTILS_USE_IMPORT_EXPORT) && 
defined(AWS_SDKUTILS_EXPORTS)
 #        define AWS_SDKUTILS_API __attribute__((visibility("default")))
 #    else
 #        define AWS_SDKUTILS_API
-#    endif /* __GNUC__ >= 4 || defined(__clang__) */
+#    endif
 
-#endif /* defined(USE_WINDOWS_DLL_SEMANTICS) || defined(WIN32) */
+#endif /* defined(AWS_CRT_USE_WINDOWS_DLL_SEMANTICS) || defined(_WIN32) */
 
 #endif /* AWS_SDKUTILS_EXPORTS_H */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/aws-c-sdkutils-0.2.3/source/endpoints_rule_engine.c 
new/aws-c-sdkutils-0.2.4/source/endpoints_rule_engine.c
--- old/aws-c-sdkutils-0.2.3/source/endpoints_rule_engine.c     2025-01-29 
00:10:58.000000000 +0100
+++ new/aws-c-sdkutils-0.2.4/source/endpoints_rule_engine.c     2025-05-15 
01:32:49.000000000 +0200
@@ -132,7 +132,6 @@
     AWS_PRECONDITION(ruleset);
     AWS_PRECONDITION(scope);
 
-    struct aws_endpoints_scope_value *val = NULL;
     scope->rule_idx = 0;
     scope->rules = &ruleset->rules;
     scope->partitions = partitions;
@@ -181,7 +180,7 @@
                 goto on_error;
             }
 
-            val = aws_endpoints_scope_value_new(allocator, key);
+            struct aws_endpoints_scope_value *val = 
aws_endpoints_scope_value_new(allocator, key);
             AWS_ASSERT(val);
 
             switch (value->type) {
@@ -193,11 +192,13 @@
                     break;
                 default:
                     AWS_LOGF_ERROR(AWS_LS_SDKUTILS_ENDPOINTS_RESOLVE, 
"Unexpected parameter type.");
+                    aws_endpoints_scope_value_destroy(val);
                     goto on_error;
             }
 
             if (aws_hash_table_put(&scope->values, &val->name.cur, val, NULL)) 
{
                 AWS_LOGF_ERROR(AWS_LS_SDKUTILS_ENDPOINTS_RESOLVE, "Failed to 
add value to top level scope.");
+                aws_endpoints_scope_value_destroy(val);
                 goto on_error;
             }
         }
@@ -206,7 +207,6 @@
     return AWS_OP_SUCCESS;
 
 on_error:
-    aws_endpoints_scope_value_destroy(val);
     return aws_raise_error(AWS_ERROR_SDKUTILS_ENDPOINTS_RESOLVE_INIT_FAILED);
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/aws-c-sdkutils-0.2.3/source/partitions.c 
new/aws-c-sdkutils-0.2.4/source/partitions.c
--- old/aws-c-sdkutils-0.2.3/source/partitions.c        2025-01-29 
00:10:58.000000000 +0100
+++ new/aws-c-sdkutils-0.2.4/source/partitions.c        2025-05-15 
01:32:49.000000000 +0200
@@ -129,9 +129,7 @@
     return AWS_OP_SUCCESS;
 
 on_error:
-    if (partition_info != NULL) {
-        aws_partition_info_destroy(partition_info);
-    }
+    aws_partition_info_destroy(partition_info);
     return aws_raise_error(AWS_ERROR_SDKUTILS_PARTITIONS_PARSE_FAILED);
 }
 
@@ -169,20 +167,23 @@
         struct aws_byte_cursor regex_cur = {0};
         if (aws_json_value_get_string(regex_node, &regex_cur)) {
             AWS_LOGF_ERROR(AWS_LS_SDKUTILS_PARTITIONS_PARSING, "Failed to 
parse region regex.");
-            goto on_error;
+            goto on_partitions_new_error;
         }
 
         partition_info->region_regex = 
aws_endpoints_regex_new(partitions->allocator, regex_cur);
+        if (partition_info->region_regex == NULL) {
+            goto on_partitions_new_error;
+        }
     }
 
     if (partition_info->info == NULL) {
         AWS_LOGF_ERROR(AWS_LS_SDKUTILS_PARTITIONS_PARSING, "Failed to parse 
partition info.");
-        goto on_error;
+        goto on_partitions_new_error;
     }
 
     if (aws_hash_table_put(&partitions->base_partitions, 
&partition_info->name, partition_info, NULL)) {
         AWS_LOGF_ERROR(AWS_LS_SDKUTILS_PARTITIONS_PARSING, "Failed to add 
partition info.");
-        goto on_error;
+        goto on_partitions_new_error;
     }
 
     struct partition_parse_wrapper wrapper = {
@@ -200,6 +201,8 @@
 
     return AWS_OP_SUCCESS;
 
+on_partitions_new_error:
+    aws_partition_info_destroy(partition_info);
 on_error:
     return aws_raise_error(AWS_ERROR_SDKUTILS_PARTITIONS_PARSE_FAILED);
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/aws-c-sdkutils-0.2.3/tests/CMakeLists.txt 
new/aws-c-sdkutils-0.2.4/tests/CMakeLists.txt
--- old/aws-c-sdkutils-0.2.3/tests/CMakeLists.txt       2025-01-29 
00:10:58.000000000 +0100
+++ new/aws-c-sdkutils-0.2.4/tests/CMakeLists.txt       2025-05-15 
01:32:49.000000000 +0200
@@ -89,6 +89,8 @@
 add_test_case(test_endpoints_condition_mem_clean_up)
 add_test_case(test_endpoints_custom)
 add_test_case(test_endpoints_string_array)
+add_test_case(test_endpoints_malformed_no_required_default)
+add_test_case(test_endpoints_malformed_regex)
 
 add_test_case(endpoints_uri_normalize_path)
 add_test_case(endpoints_byte_buf_init_from_resolved_templated_string)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/aws-c-sdkutils-0.2.3/tests/endpoints_rule_engine_tests.c 
new/aws-c-sdkutils-0.2.4/tests/endpoints_rule_engine_tests.c
--- old/aws-c-sdkutils-0.2.3/tests/endpoints_rule_engine_tests.c        
2025-01-29 00:10:58.000000000 +0100
+++ new/aws-c-sdkutils-0.2.4/tests/endpoints_rule_engine_tests.c        
2025-05-15 01:32:49.000000000 +0200
@@ -502,3 +502,64 @@
 
     return AWS_OP_SUCCESS;
 }
+
+AWS_TEST_CASE(test_endpoints_malformed_no_required_default, 
s_test_endpoints_malformed_no_required_default)
+static int s_test_endpoints_malformed_no_required_default(struct aws_allocator 
*allocator, void *ctx) {
+    (void)ctx;
+
+    aws_sdkutils_library_init(allocator);
+
+    struct aws_byte_buf buf;
+    ASSERT_SUCCESS(
+        read_file_contents(&buf, allocator, 
aws_byte_cursor_from_c_str("malformed-rules/no_default_on_required.json")));
+    struct aws_byte_cursor ruleset_json = aws_byte_cursor_from_buf(&buf);
+
+    struct aws_endpoints_ruleset *ruleset = 
aws_endpoints_ruleset_new_from_string(allocator, ruleset_json);
+    ASSERT_NOT_NULL(ruleset);
+
+    struct aws_byte_buf partitions_buf;
+    ASSERT_SUCCESS(
+        read_file_contents(&partitions_buf, allocator, 
aws_byte_cursor_from_c_str("sample_partitions.json")));
+    struct aws_byte_cursor partitions_json = 
aws_byte_cursor_from_buf(&partitions_buf);
+    struct aws_partitions_config *partitions = 
aws_partitions_config_new_from_string(allocator, partitions_json);
+    ASSERT_NOT_NULL(partitions);
+
+    struct aws_endpoints_rule_engine *engine = 
aws_endpoints_rule_engine_new(allocator, ruleset, partitions);
+    ASSERT_NOT_NULL(engine);
+    struct aws_endpoints_request_context *context = 
aws_endpoints_request_context_new(allocator);
+    ASSERT_NOT_NULL(context);
+    struct aws_endpoints_resolved_endpoint *resolved = NULL;
+    ASSERT_ERROR(
+        AWS_ERROR_SDKUTILS_ENDPOINTS_RESOLVE_INIT_FAILED,
+        aws_endpoints_rule_engine_resolve(engine, context, &resolved));
+
+    aws_endpoints_ruleset_release(ruleset);
+    aws_partitions_config_release(partitions);
+    aws_endpoints_rule_engine_release(engine);
+    aws_endpoints_request_context_release(context);
+    aws_byte_buf_clean_up(&buf);
+    aws_byte_buf_clean_up(&partitions_buf);
+    aws_sdkutils_library_clean_up();
+
+    return AWS_OP_SUCCESS;
+}
+
+AWS_TEST_CASE(test_endpoints_malformed_regex, s_test_endpoints_malformed_regex)
+static int s_test_endpoints_malformed_regex(struct aws_allocator *allocator, 
void *ctx) {
+    (void)ctx;
+
+    aws_sdkutils_library_init(allocator);
+
+    struct aws_byte_buf partitions_buf;
+    ASSERT_SUCCESS(
+        read_file_contents(&partitions_buf, allocator, 
aws_byte_cursor_from_c_str("sample_partitions_bad_regex.json")));
+    struct aws_byte_cursor partitions_json = 
aws_byte_cursor_from_buf(&partitions_buf);
+    struct aws_partitions_config *partitions = 
aws_partitions_config_new_from_string(allocator, partitions_json);
+    ASSERT_NULL(partitions);
+    ASSERT_INT_EQUALS(AWS_ERROR_SDKUTILS_PARTITIONS_PARSE_FAILED, 
aws_last_error());
+
+    aws_byte_buf_clean_up(&partitions_buf);
+    aws_sdkutils_library_clean_up();
+
+    return AWS_OP_SUCCESS;
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/aws-c-sdkutils-0.2.3/tests/resources/malformed-rules/no_default_on_required.json
 
new/aws-c-sdkutils-0.2.4/tests/resources/malformed-rules/no_default_on_required.json
--- 
old/aws-c-sdkutils-0.2.3/tests/resources/malformed-rules/no_default_on_required.json
        1970-01-01 01:00:00.000000000 +0100
+++ 
new/aws-c-sdkutils-0.2.4/tests/resources/malformed-rules/no_default_on_required.json
        2025-05-15 01:32:49.000000000 +0200
@@ -0,0 +1,26 @@
+{
+  "parameters": {
+    "param1": {
+      "type": "string",
+      "default": "",
+      "required": true
+    },
+    "boolParam": {
+      "type": "boolean",
+      "required": true
+    }
+  },
+  "rules": [
+    {
+      "conditions": [
+        {
+          "fn": "booleanEquals",
+          "argv": []
+        }
+      ],
+      "endpoint": {},
+      "type": "endpoint"
+    }
+  ],
+  "version": "1.0"
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/aws-c-sdkutils-0.2.3/tests/resources/sample_partitions.json 
new/aws-c-sdkutils-0.2.4/tests/resources/sample_partitions.json
--- old/aws-c-sdkutils-0.2.3/tests/resources/sample_partitions.json     
2025-01-29 00:10:58.000000000 +0100
+++ new/aws-c-sdkutils-0.2.4/tests/resources/sample_partitions.json     
2025-05-15 01:32:49.000000000 +0200
@@ -3,7 +3,7 @@
     "partitions": [
       {
         "id": "aws",
-        "regionRegex": "^(us|eu|ap|sa|ca|me|af)-\\w+-\\d+$",
+        "regionRegex": "^(us|eu|ap|sa|ca|me|af|il)\\-\\w+\\-\\d+$",
         "regions": {
           "af-south-1": {
             "supportsFIPS": false 
@@ -42,4 +42,4 @@
         }
       }
     ]
-  }
\ No newline at end of file
+  }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/aws-c-sdkutils-0.2.3/tests/resources/sample_partitions_bad_regex.json 
new/aws-c-sdkutils-0.2.4/tests/resources/sample_partitions_bad_regex.json
--- old/aws-c-sdkutils-0.2.3/tests/resources/sample_partitions_bad_regex.json   
1970-01-01 01:00:00.000000000 +0100
+++ new/aws-c-sdkutils-0.2.4/tests/resources/sample_partitions_bad_regex.json   
2025-05-15 01:32:49.000000000 +0200
@@ -0,0 +1,45 @@
+{
+    "version": "1.1",
+    "partitions": [
+      {
+        "id": "aws",
+        "regionRegex": "^(us|eu|ap|sa|ca|me|af)-\\w+-\\d+$",
+        "regions": {
+          "af-south-1": {
+            "supportsFIPS": false 
+          },
+          "af-east-1": {},
+          "ap-northeast-1": {},
+          "ap-northeast-2": {},
+          "ap-northeast-3": {},
+          "ap-south-1": {},
+          "ap-southeast-1": {},
+          "ap-southeast-2": {},
+          "ap-southeast-3": {},
+          "ca-central-1": {},
+          "eu-central-1": {},
+          "eu-north-1": {},
+          "eu-south-1": {},
+          "eu-west-1": {},
+          "eu-west-2": {},
+          "eu-west-3": {},
+          "me-south-1": {},
+          "sa-east-1": {},
+          "us-east-1": {},
+          "us-east-2": {},
+          "us-west-1": {},
+          "us-west-2": {
+            "description" : "US West (Oregon)"
+          },
+          "aws-global": {}
+        },
+        "outputs": {
+          "name": "aws",
+          "dnsSuffix": "amazonaws.com",
+          "dualStackDnsSuffix": "api.aws",
+          "supportsFIPS": true,
+          "supportsDualStack": true
+        }
+      }
+    ]
+  }
\ No newline at end of file

Reply via email to