j1sk1ss opened a new pull request, #13986:
URL: https://github.com/apache/apisix/pull/13986

   ### Description
   
   `fetch_latest_conf` can return `nil` when the referenced resource has 
already been deleted. `get_nodes_ver` and `set_nodes_ver_and_nodes` used the 
returned value immediately, which could raise an attempt to index a nil value.
   
   This PR adds nil guards for that case. `get_nodes_ver` now returns `nil` 
when the latest resource config is unavailable, and `set_nodes_ver_and_nodes` 
exits without updating nodes when the resource no longer exists.
   
   #### Which issue(s) this PR fixes:
   
   Fixes #
   
   ### Checklist
   
   - [x] I have explained the need for this PR and the problem it solves
   - [x] I have explained the changes or the new features added to this PR
   - [ ] I have added tests corresponding to this change
   - [ ] I have updated the documentation to reflect this change
   - [x] I have verified that this change is backward compatible (If not, 
please discuss on the [APISIX mailing 
list](https://github.com/apache/apisix/tree/master#community) first)
   
   Found this with [Svace](https://svace.pages.ispras.ru/svace-website/en/) 
static analyzer


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to