mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
xdrgen: Fix the variable-length opaque field decoder template
Ensure that variable-length opaques are decoded into the named field, and do not overwrite the structure itself. Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
This commit is contained in:
@@ -2,5 +2,5 @@
|
||||
{% if annotate %}
|
||||
/* member {{ name }} (variable-length opaque) */
|
||||
{% endif %}
|
||||
if (!xdrgen_decode_opaque(xdr, (opaque *)ptr, {{ maxsize }}))
|
||||
if (!xdrgen_decode_opaque(xdr, &ptr->{{ name }}, {{ maxsize }}))
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user