File tree Expand file tree Collapse file tree 5 files changed +136
-25
lines changed
deps/azure-c-shared-utility
inc/azure_c_shared_utility Expand file tree Collapse file tree 5 files changed +136
-25
lines changed Original file line number Diff line number Diff line change @@ -98,11 +98,11 @@ jobs:
9898 displayName: Install build script requirements
9999
100100 - script : |
101+ call "$(VS_ENTERPRISE_PATH)\VC\Auxiliary\Build\vcvars64.bat"
101102 python -m pip install cibuildwheel==2.16.2
102103 displayName: Install cibuildwheel 2.16.2
103104
104105 - pwsh : |
105- call "$(VS_ENTERPRISE_PATH)\VC\Auxiliary\Build\vcvars64.bat"
106106 cibuildwheel --output-dir dist .
107107 displayName: 'Build uAMQP Wheel'
108108 env:
Original file line number Diff line number Diff line change 22
33 Release History
44===============
5+ 1.6.7 (2024-01-17)
6+ +++++++++++++++++++
7+
8+ - Fixes for CVE-2024-21646
9+
5101.6.6 (2023-11-16)
611+++++++++++++++++++
712
Original file line number Diff line number Diff line change @@ -373,6 +373,7 @@ set(source_h_files
373373 ./inc/azure_c_shared_utility/tlsio.h
374374 ./inc/azure_c_shared_utility/optionhandler.h
375375 ./inc/azure_c_shared_utility/memory_data.h
376+ ./inc/azure_c_shared_utility/safe_math.h
376377 ${LOGGING_STACKTRACE_H_FILE}
377378)
378379
Original file line number Diff line number Diff line change 1+ // Copyright (c) Microsoft. All rights reserved.
2+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3+
4+ #ifndef SAFE_MATH_H
5+ #define SAFE_MATH_H
6+
7+ #ifndef SIZE_MAX
8+ #define SIZE_MAX ((size_t)((size_t)~(size_t)0))
9+ #endif
10+
11+ #define safe_add_size_t (a , b ) ((((size_t)(a)) < ((size_t)(SIZE_MAX - ((size_t)(b))))) ? ((size_t)(a) + (size_t)(b)) : SIZE_MAX)
12+
13+ #define safe_subtract_size_t (a , b ) (((a) >= (b)) ? ((size_t)(a) - (size_t)(b)) : SIZE_MAX)
14+
15+ #define safe_multiply_size_t (a , b ) (((a) == 0 || (b) == 0) ? 0 : (((SIZE_MAX / (size_t)(a)) >= (size_t)(b)) ? (size_t)(a) * (size_t)(b) : SIZE_MAX))
16+
17+ #endif // SAFE_MATH_H
You can’t perform that action at this time.
0 commit comments