Skip to content

Commit

Permalink
[FAPI] Fix appdata corruption caused by offset miscalculation
Browse files Browse the repository at this point in the history
Signed-off-by: wenxin.leong <wenxin.leong@infineon.com>
  • Loading branch information
wxleong authored and AndreasFuchsTPM committed May 2, 2024
1 parent 5679368 commit f85d141
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/backend_fapi.c
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,7 @@ CK_RV backend_fapi_update_tobject_attrs(token *t, tobject *tobj, attr_list *attr
memcpy(&newappdata[0], &appdata[0], tobj_start);
sprintf((char*)&newappdata[tobj_start], "%08x:%s", tobj->id, attrs);
memcpy(&newappdata[tobj_start + 9 + strlen(attrs) + 1],
&appdata[tobj_start + tobj_len],
&appdata[tobj_start + tobj_len + 1],
appdata_len - tobj_start - tobj_len - 1);
newappdata[newappdata_len - 1] = '\0';

Expand Down

0 comments on commit f85d141

Please sign in to comment.