If an array is specified with the ustring or symstr, the length of the strings are accumlated on both of 'ret' and 'total', which means the length is double counted. Just set the length to the 'ret' value for avoiding double counting. Link: https://lore.kernel.org/all/168908492917.123124.15076463491122036025.stgit@devnote2/
Unified · Split
| @@ -156,11 +156,11 @@ stage3: · 155 unmodified lines | ||
| 156 | 156 | code++; |
| 157 | 157 | goto array; |
| 158 | 158 | case FETCH_OP_ST_USTRING: |
| 159 | − ret += fetch_store_strlen_user(val + code->offset); | |
| 159 | + ret = fetch_store_strlen_user(val + code->offset); | |
| 160 | 160 | code++; |
| 161 | 161 | goto array; |
| 162 | 162 | case FETCH_OP_ST_SYMSTR: |
| 163 | − ret += fetch_store_symstrlen(val + code->offset); | |
| 163 | + ret = fetch_store_symstrlen(val + code->offset); | |
| 164 | 164 | code++; |
| 165 | 165 | goto array; |
| 166 | 166 | default: |