Files
opencv-MIRROR/modules/core/src
Vincent Rabaud 3880d059b3 Merge pull request #24260 from vrabaud:ubsan
Fix undefined behavior arithmetic in copyMakeBorder and adjustROI. #24260

This is due to the undefined: negative int multiplied by size_t pointer increment.

To test, compile with:
```
mkdir build
cd build
cmake ../ -DCMAKE_C_FLAGS_INIT="-fsanitize=undefined" -DCMAKE_CXX_FLAGS_INIT="-fsanitize=undefined" -DCMAKE_C_COMPILER="/usr/bin/clang" -DCMAKE_CXX_COMPILER="/usr/bin/clang++" -DCMAKE_SHARED_LINKER_FLAGS="-fsanitize=undefined -lubsan"
```
And run:
```
make -j opencv_test_core && ./bin/opencv_test_core --gtest_filter=*UndefinedBehavior*
```

### Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

- [x] I agree to contribute to the project under Apache 2 License.
- [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
- [x] The PR is proposed to the proper branch
- [x] There is a reference to the original bug report and related work
- [x] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [x] The feature is well documented and sample code can be built with the project CMake
2023-09-14 15:16:28 +03:00
..
2023-08-10 22:43:46 +02:00
2023-07-20 15:53:57 +02:00
2023-09-05 22:04:26 +03:00
2021-03-02 23:24:28 +00:00
2022-03-03 07:21:53 +09:00
2019-12-27 12:46:53 +00:00
2023-03-22 09:17:41 +03:00
2022-12-07 23:58:36 +00:00
…
2021-03-02 23:24:28 +00:00
2021-03-02 23:24:28 +00:00
2023-06-23 20:12:58 +03:00
…
2021-03-02 23:24:28 +00:00
2019-09-27 16:29:50 +03:00
2021-03-02 23:24:28 +00:00
…
…
2022-03-15 19:08:20 +03:00