Index: src/pkcs15init/pkcs15-lib.c
===================================================================
--- src/pkcs15init/pkcs15-lib.c	(revision 4043)
+++ src/pkcs15init/pkcs15-lib.c	(working copy)
@@ -3670,6 +3670,7 @@
 	r = do_encode_string(&p, end, OPENSC_INFO_TAG_PROFILE, profile->name);
 	for (n = 0; r >= 0 && profile->options[n]; n++)
 		r = do_encode_string(&p, end, OPENSC_INFO_TAG_OPTION, profile->options[n]);
+	*p++ = 0xff;	//same purpose as '\0' to end a string
 
 	if (r >= 0) {
 		file->size = p - buffer;
