8000 int _baseCellToCCWrot60: Possible Buffer Overflow · Issue #978 · uber/h3 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

int _baseCellToCCWrot60: Possible Buffer Overflow #978

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

Open
stasos24 opened this issue Mar 5, 2025 · 0 comments
Open

int _baseCellToCCWrot60: Possible Buffer Overflow #978

stasos24 opened this issue Mar 5, 2025 · 0 comments

Comments

@stasos24
Copy link
stasos24 commented Mar 5, 2025

Since array :

static const BaseCellRotation faceIjkBaseCells[NUM_ICOSA_FACES][3][3][3] = {

has size:
#define NUM_ICOSA_FACES 20

it could be overflow at:
int _baseCellToCCWrot60(int baseCell, int face) {
if (face < 0 || face > NUM_ICOSA_FACES) return INVALID_ROTATIONS;
for (int i = 0; i < 3; i++) {
for (int j = 0; j < 3; j++) {
for (int k = 0; k < 3; k++) {
if (faceIjkBaseCells[face][i][j][k].baseCell == baseCell) {
return faceIjkBaseCells[face][i][j][k].ccwRot60;

when face = 20

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

No branches or pull requests

1 participant
0