tls: fix appdata buffer