| 8c4332a5 | 15-Jul-2025 |
Kasun Athukorala <kasunath@google.com> |
Verify dictionary property name length
This change verifies the dictionary property name length.
Tested: Unit tested
Signed-off-by: Kasun Athukorala <kasunath@google.com> Change-Id: I65f19d5bb1b8c
Verify dictionary property name length
This change verifies the dictionary property name length.
Tested: Unit tested
Signed-off-by: Kasun Athukorala <kasunath@google.com> Change-Id: I65f19d5bb1b8c9f838e427fd6d8ba17e2886bf9a
show more ...
|
| 7c1be8dd | 15-Jul-2025 |
Kasun Athukorala <kasunath@google.com> |
Check dictionary sizes to avoid any heap overflows
Tested: Unit tested
Signed-off-by: Kasun Athukorala <kasunath@google.com> Change-Id: I34972b7f4daf0e818461ef2a4842966a247fc20e |
| 6fd03fbf | 15-Jul-2025 |
Kasun Athukorala <kasunath@google.com> |
Check SFLV tuple is within stream before decoding
If the SFLV tuple being decoded goes out of the stream length it could lead to a heap overflow. This patch adds a check to prevent it.
Tested: Unit
Check SFLV tuple is within stream before decoding
If the SFLV tuple being decoded goes out of the stream length it could lead to a heap overflow. This patch adds a check to prevent it.
Tested: Unit tested
Signed-off-by: Kasun Athukorala <kasunath@google.com> Change-Id: Ie018d4f3614603efc6ed8b93fa0077c612d9b481
show more ...
|
| 485044b1 | 14-Jul-2025 |
Kasun Athukorala <kasunath@google.com> |
bej_decoder: Check decoded string length
We need to check the bejString value lengths to prevent heap buffer overflow
Tested: Unit tested
Change-Id: Ie6a014fbffeb31f111bfbae331db197b3fb2f2ca Signe
bej_decoder: Check decoded string length
We need to check the bejString value lengths to prevent heap buffer overflow
Tested: Unit tested
Change-Id: Ie6a014fbffeb31f111bfbae331db197b3fb2f2ca Signed-off-by: Kasun Athukorala <kasunath@google.com>
show more ...
|
| 9eb0117f | 23-Jun-2025 |
Brandon Kim <brandonkim@google.com> |
bej_decoder_json: Add a limit on # of 0s in "real"
We have count the number of 0s in real numbers to add to the output string. To prevent OOM from many 0s, add a limit.
Tested: Add unit test
Chang
bej_decoder_json: Add a limit on # of 0s in "real"
We have count the number of 0s in real numbers to add to the output string. To prevent OOM from many 0s, add a limit.
Tested: Add unit test
Change-Id: I5e298554cf9d93b3f7ab86cac5b0b0a6f443716b Signed-off-by: Brandon Kim <brandonkim@google.com>
show more ...
|
| ef01d4c5 | 23-Jun-2025 |
Brandon Kim <brandonkim@google.com> |
bej: Fix typo for enum "bejErrorNotSuppoted"
The enum had a typo as "bejErrorNotSuppoted" with missing 'r'. Replace with "bejErrorNotSupported"
Tested: N/A
Change-Id: Ieced19f88757caeb555dbdad817a
bej: Fix typo for enum "bejErrorNotSuppoted"
The enum had a typo as "bejErrorNotSuppoted" with missing 'r'. Replace with "bejErrorNotSupported"
Tested: N/A
Change-Id: Ieced19f88757caeb555dbdad817ab2fbbbe8ce8d Signed-off-by: Brandon Kim <brandonkim@google.com>
show more ...
|
| 07abbf89 | 23-Jun-2025 |
Brandon Kim <brandonkim@google.com> |
bej_decoder: Add a limit on number of operations
This is to prevent the decoder from taking on a huge number of operations from a single input, that could cause the main while loop for bejDecode to
bej_decoder: Add a limit on number of operations
This is to prevent the decoder from taking on a huge number of operations from a single input, that could cause the main while loop for bejDecode to run for a long time.
Tested: Unit test passes
Change-Id: Idb68b706d3634d1874d1814f17420076672d21ee Signed-off-by: Brandon Kim <brandonkim@google.com>
show more ...
|
| 3b6fb071 | 30-May-2025 |
Patrick Williams <patrick@stwcx.xyz> |
clang-tidy: format with config-clang-tidy
Reformat the .clang-tidy file for consistency using the config-clang-tidy tool from openbmc-build-scripts.
Change-Id: I25c7abf5bed8cc1931a8ab325ecf36e9b7af
clang-tidy: format with config-clang-tidy
Reformat the .clang-tidy file for consistency using the config-clang-tidy tool from openbmc-build-scripts.
Change-Id: I25c7abf5bed8cc1931a8ab325ecf36e9b7afcd81 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
| c3ab4171 | 01-Feb-2025 |
Patrick Williams <patrick@stwcx.xyz> |
meson: reformat with meson formatter
Apply the `meson format` results.
Change-Id: I310cd74890fc18c36958a11fcb544413a809ed01 Signed-off-by: Patrick Williams <patrick@stwcx.xyz> |
| 045a2d65 | 01-Feb-2025 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: update latest spec and reformat
Copy the latest format file from the docs repository and apply.
Change-Id: Ibfcb2a3a7ae4312abe2cc727ef7b702758c5757e Signed-off-by: Patrick Williams <p
clang-format: update latest spec and reformat
Copy the latest format file from the docs repository and apply.
Change-Id: Ibfcb2a3a7ae4312abe2cc727ef7b702758c5757e Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
| a4bb3d7f | 30-Jan-2025 |
Patrick Williams <patrick@stwcx.xyz> |
build: use allowed over enabled or not-disabled
Meson feature options are typically in a tri-state of enabled, disabled, or auto. The enabled and disabled functions on an option (from `get_option`)
build: use allowed over enabled or not-disabled
Meson feature options are typically in a tri-state of enabled, disabled, or auto. The enabled and disabled functions on an option (from `get_option`) no longer return true for auto features. Instead, the expectation is to use `allowed()` which is true for both enabled and auto.
Switch all uses of `enabled` to `allowed`. Switch all uses of `not disabled` to `allowed`.
Change-Id: I079b8c0c94e9e22b37f84344cd8e6638e47aa0bc Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
| 057f4297 | 18-Dec-2024 |
Jayanth Othayoth <ojayanth@gmail.com> |
clang-tidy: Initial commit
The clang-tidy configuration file has been initialized with all recommended C++ category checks. These category checks are currently disabled, except for one, which has be
clang-tidy: Initial commit
The clang-tidy configuration file has been initialized with all recommended C++ category checks. These category checks are currently disabled, except for one, which has been enabled for initial validation. This strategy allows developers to progressively enable the necessary checks over time.
Tested: verified build.
Change-Id: Ibcdecfdccb48569f73c2fc3ae6490921fe36e120 Signed-off-by: Jayanth Othayoth <ojayanth@gmail.com>
show more ...
|
| 716c741d | 19-Dec-2024 |
Jayanth Othayoth <ojayanth@gmail.com> |
clang-tidy: Add prototype to function declarations
Replaced function declarations without prototypes with proper prototypes to comply with modern C standards and resolve deprecation warnings.
''' e
clang-tidy: Add prototype to function declarations
Replaced function declarations without prototypes with proper prototypes to comply with modern C standards and resolve deprecation warnings.
''' error: a function declaration without a prototype is deprecated in all versions of C [clang-diagnostic-strict-prototypes] '''
Tested: Build verified
Change-Id: Ia85ad603623aa64e157dd7550d8023e6861d9201 Signed-off-by: Jayanth Othayoth <ojayanth@gmail.com>
show more ...
|
| 77535192 | 19-Dec-2024 |
Jayanth Othayoth <ojayanth@gmail.com> |
clang-tidy: Replace NULL with nullptr
Replaced all instances of NULL with nullptr to improve type safety and clarity, as nullptr is the modern C++ standard for null pointers.
Tested: Build verified
clang-tidy: Replace NULL with nullptr
Replaced all instances of NULL with nullptr to improve type safety and clarity, as nullptr is the modern C++ standard for null pointers.
Tested: Build verified
Change-Id: Ie9e20e9f97d9a2b974a4a8748a3daaf5d516adb8 Signed-off-by: Jayanth Othayoth <ojayanth@gmail.com>
show more ...
|
| bd91e601 | 18-Dec-2024 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: re-format for clang-19
clang-format-19 isn't compatible with the clang-format-18 output, so we need to reformat the code with the latest version. A few parameters in clang-tidy have b
clang-format: re-format for clang-19
clang-format-19 isn't compatible with the clang-format-18 output, so we need to reformat the code with the latest version. A few parameters in clang-tidy have been deprecated, so adjust the style file accordingly.
See Ie2f6eb3b043f2d655c9df806815afd7971fd0947 for updated style. See I88192b41ab7a95599a90915013579608af7bc56f for clang-19 enablement.
Change-Id: Idf9372c0d6cfcbf117fe204486694095f289dd4a Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
| a46f9850 | 27-Sep-2024 |
Brian Ma <chma0@nuvoton.com> |
bej_tree: initialize node attribute format
While initializing the parent and child nodes, initialize the reserved bit of the node attribute format to prevent unexpected reserved bit setting.
And al
bej_tree: initialize node attribute format
While initializing the parent and child nodes, initialize the reserved bit of the node attribute format to prevent unexpected reserved bit setting.
And also override gtest's PrintTo function to avoid accessing uninitialized areas due to structure alignment.
Tested: Run test cases pass
Change-Id: I5b113f47c41ad15de578b80bf5e859f3b0c40503 Signed-off-by: Brian Ma <chma0@nuvoton.com>
show more ...
|
| be27f2e9 | 16-Aug-2024 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: re-format for clang-18
clang-format-18 isn't compatible with the clang-format-17 output, so we need to reformat the code with the latest version. The way clang-18 handles lambda forma
clang-format: re-format for clang-18
clang-format-18 isn't compatible with the clang-format-17 output, so we need to reformat the code with the latest version. The way clang-18 handles lambda formatting also changed, so we have made changes to the organization default style format to better handle lambda formatting.
See I5e08687e696dd240402a2780158664b7113def0e for updated style. See Iea0776aaa7edd483fa395e23de25ebf5a6288f71 for clang-18 enablement.
Change-Id: I133f4f43d4955ba1b86b924fc741aa5a56f34239 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
| 2bc745a3 | 01-Apr-2024 |
Konstantin Aladyshev <aladyshev22@gmail.com> |
meson: Provide wrap for nlohmann
Currently on the system without nlohmann installed local build fails with error: """ ../test/include/bej_common_test.hpp:5:10: fatal error: nlohmann/json.hpp: No suc
meson: Provide wrap for nlohmann
Currently on the system without nlohmann installed local build fails with error: """ ../test/include/bej_common_test.hpp:5:10: fatal error: nlohmann/json.hpp: No such file or directory 5 | #include "nlohmann/json.hpp" """ Provide wrap file for nlohmann and add the necessary dependency to fix the issue.
Tested: Local build via "meson setup build && cd build && meson compile" now finishes without errors.
Change-Id: I8d63dac6f8963c7da2c5831a1fb1998663a12f6f Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com>
show more ...
|
| da6e5573 | 13-Mar-2023 |
Nikhil Namjoshi <nikhilnamjoshi@google.com> |
Add libbej encoder wrapper for C++
Add unit tests and the test data files needed for unit tests. Move APIs from bej_decoder_test.cpp to a common file, to share those with bej_encoder_test.cpp
Teste
Add libbej encoder wrapper for C++
Add unit tests and the test data files needed for unit tests. Move APIs from bej_decoder_test.cpp to a common file, to share those with bej_encoder_test.cpp
Tested: Verified that encoding using the wrapper works well at runtime. Verified that the unit tests pass.
Change-Id: I61b7c17690eb7e7fefd1973a22d4316c6214267e Signed-off-by: Nikhil Namjoshi <nikhilnamjoshi@google.com>
show more ...
|
| 6eb945fa | 29-Nov-2023 |
Patrick Williams <patrick@stwcx.xyz> |
build: use allowed over enabled
Meson feature options are typically in a tri-state of enabled, disabled, or auto. The enabled and disabled functions on an option (from `get_option`) no longer retur
build: use allowed over enabled
Meson feature options are typically in a tri-state of enabled, disabled, or auto. The enabled and disabled functions on an option (from `get_option`) no longer return true for auto features. Instead, the expectation is to use `allowed()` which is true for both enabled and auto.
Switch all uses of `enabled` to `allowed`.
Change-Id: I0c79d23d21956ffd007b1d1001bf6aaa0f72103b Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
| 6f3082ea | 20-Oct-2023 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: copy latest and re-format
clang-format-17 has some backwards incompatible changes that require additional settings for best compatibility and re-running the formatter. Copy the latest
clang-format: copy latest and re-format
clang-format-17 has some backwards incompatible changes that require additional settings for best compatibility and re-running the formatter. Copy the latest .clang-format from the docs repository and reformat the repository.
Change-Id: If45530480fdd7acb46a6a1b116187bcfcd90ac83 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
| 6df0c486 | 18-Aug-2023 |
kasunath <kasunath@google.com> |
Encode more BEJ data types
This patch add encoding support for bejString, bejReal, bejBool and bejPropertyAnnotation types.
Signed-off-by: Kasun Athukorala <kasunath@google.com> Change-Id: I5c7dc30
Encode more BEJ data types
This patch add encoding support for bejString, bejReal, bejBool and bejPropertyAnnotation types.
Signed-off-by: Kasun Athukorala <kasunath@google.com> Change-Id: I5c7dc302dfd4e374f792f2eee643f4adaac7e1f9
show more ...
|
| 0a29193f | 18-Aug-2023 |
kasunath <kasunath@google.com> |
Encode bejArray, bejNull, bejInteger and bejEnum
Signed-off-by: Kasun Athukorala <kasunath@google.com> Change-Id: I2b851be69b51fe95a14287d1ca5f94ffcf757d0f |
| bde1bfa1 | 18-Aug-2023 |
kasunath <kasunath@google.com> |
Get metadata for bejNull type
Signed-off-by: Kasun Athukorala <kasunath@google.com> Change-Id: I08d0c8f26e1ed64f67cfcf857fbdd8573dae75d4 |
| de02e7da | 18-Aug-2023 |
kasunath <kasunath@google.com> |
Get metadata for bejReal type
Signed-off-by: Kasun Athukorala <kasunath@google.com> Change-Id: Ib5de2d4fde4a129cb32988268c3289ba06572b16 |