Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

verify w and h input multiplication overflow to rleEncode() #1548

Conversation

yunchu
Copy link
Contributor

@yunchu yunchu commented Jun 27, 2024

Summary

To apply same changes of #1544 to 1.8.0

How to test

Checklist

  • I have added unit tests to cover my changes.​
  • I have added integration tests to cover my changes.​
  • I have added the description of my changes into CHANGELOG.​
  • I have updated the documentation accordingly

License

  • I submit my code changes under the same MIT License that covers the project.
    Feel free to contact the maintainers if that's a concern.
  • I have updated the license header for each file (see an example below).
# Copyright (C) 2024 Intel Corporation
#
# SPDX-License-Identifier: MIT

@yunchu yunchu requested review from a team as code owners June 27, 2024 01:05
@yunchu yunchu requested review from jihyeonyi and removed request for a team June 27, 2024 01:05
siz j, k, a = w * h;

if (a / w != h)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we also check for cases where 'w' is 0? And if a/w results in a floating-point value, we shouldn't compare it using !=.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jihyeonyi w and h would be passed from the size of numpy 2d array so i think it would be verified while initializing 2d array. and this function will not be exposed directly to the python.

@yunchu yunchu merged commit bd87793 into openvinotoolkit:releases/1.8.0 Jun 27, 2024
15 checks passed
@yunchu yunchu deleted the add-input-verification-to-rleencode-cpp branch June 27, 2024 12:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants