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

Null deref coverity finding #705

Closed
trufae opened this issue Nov 19, 2024 · 1 comment · Fixed by #706
Closed

Null deref coverity finding #705

trufae opened this issue Nov 19, 2024 · 1 comment · Fixed by #706

Comments

@trufae
Copy link
Contributor

trufae commented Nov 19, 2024



________________________________________________________________________________________________________
*** CID [1565744](tel:1565744):  Null pointer dereferences  (FORWARD_NULL)
/shlr/qjs/src/quickjs.c: 40918 in js_iterator_helper_next()
40912             break;
40913         default:
40914             abort();
40915         }
40916     
40917     done:
   CID [1565744](tel:1565744):  Null pointer dereferences  (FORWARD_NULL)
   Dereferencing null pointer "it".
40918         it->done = magic == GEN_MAGIC_NEXT ? *pdone : TRUE;
40919         it->executing = FALSE;
40920         return ret;
40921     fail:
40922         if (it) {
40923             /* close the iterator object, preserving pending exception */
@saghul
Copy link
Contributor

saghul commented Nov 19, 2024

Good catch! Fix in #706

saghul added a commit that referenced this issue Nov 19, 2024
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 a pull request may close this issue.

2 participants