[frontend] Replace use of strncpy with data()
Description
Fixes https://sonarcloud.io/project/security_hotspots?id=cern-cta_CTA&hotspots=AZqS8pNKeY_KLGES3aOz
Checklist
-
Documentation reflects the changes made. -
Merge Request title is clear, concise, and suitable as a changelog entry. See our contributing docs
References
Closes #1363 (closed)