ofir vainshtein has uploaded this change for review. (
https://review.gerrithub.io/c/ffilz/nfs-ganesha/+/1238448?usp=email )
Change subject: Replace assert with a check for memory availability in readdir.
......................................................................
Replace assert with a check for memory availability in readdir.
The assert ensuring `mem_avail >= pos_start` has been replaced with an explicit check.
If there isn't enough memory, a warning is logged, and the function bails out to the
failure path. This prevents potential issues in production builds where asserts are often
disabled.
Change-Id: Idc8fead167910b65d0fff47eafd1643f1db70355
Signed-off-by: Ofir Vainshtein <ofirvins(a)google.com>
---
M src/Protocols/NFS/nfs4_op_readdir.c
1 file changed, 5 insertions(+), 1 deletion(-)
git pull ssh://review.gerrithub.io:29418/ffilz/nfs-ganesha refs/changes/48/1238448/1
--
To view, visit
https://review.gerrithub.io/c/ffilz/nfs-ganesha/+/1238448?usp=email
To unsubscribe, or for help writing mail filters, visit
https://review.gerrithub.io/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: ffilz/nfs-ganesha
Gerrit-Branch: next
Gerrit-Change-Id: Idc8fead167910b65d0fff47eafd1643f1db70355
Gerrit-Change-Number: 1238448
Gerrit-PatchSet: 1
Gerrit-Owner: ofir vainshtein <ofirvins(a)google.com>