Changeset 2993 for trunk/src/libopensc/pkcs15-infocamere.c
- Timestamp:
- 07/12/06 08:12:38 (3 years ago)
- Files:
-
- 1 modified
-
trunk/src/libopensc/pkcs15-infocamere.c (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/libopensc/pkcs15-infocamere.c
r2722 r2993 31 31 #include <string.h> 32 32 #include <stdio.h> 33 #include "strlcpy.h" 33 34 34 35 #ifdef HAVE_ZLIB_H … … 96 97 info.stored_length /= 2; 97 98 98 str ncpy(obj.label, label, SC_PKCS15_MAX_LABEL_SIZE-1);99 strlcpy(obj.label, label, sizeof(obj.label)); 99 100 obj.flags = obj_flags; 100 101 … … 129 130 130 131 obj.flags = obj_flags; 131 str ncpy(obj.label, label, SC_PKCS15_MAX_LABEL_SIZE-1);132 strlcpy(obj.label, label, sizeof(obj.label)); 132 133 if (auth_id != NULL) 133 134 obj.auth_id = *auth_id; … … 152 153 info.path = *path; 153 154 154 str ncpy(obj.label, label, SC_PKCS15_MAX_LABEL_SIZE-1);155 strlcpy(obj.label, label, sizeof(obj.label)); 155 156 obj.flags = obj_flags; 156 157 … … 327 328 cert_info.authority = authority; 328 329 cert_info.path = path; 329 str ncpy(cert_obj.label, authlabel, SC_PKCS15_MAX_LABEL_SIZE - 1);330 strlcpy(cert_obj.label, authlabel, sizeof(cert_obj.label)); 330 331 cert_obj.flags = SC_PKCS15_CO_FLAG_MODIFIABLE; 331 332 … … 385 386 cert_info.authority = authority; 386 387 cert_info.path = path; 387 str ncpy(cert_obj.label, label, SC_PKCS15_MAX_LABEL_SIZE - 1);388 strlcpy(cert_obj.label, label, sizeof(cert_obj.label)); 388 389 cert_obj.flags = SC_PKCS15_CO_FLAG_MODIFIABLE; 389 390 … … 420 421 cert_info.authority = authority; 421 422 cert_info.path = path; 422 str ncpy(cert_obj.label, calabel, SC_PKCS15_MAX_LABEL_SIZE - 1);423 strlcpy(cert_obj.label, calabel, sizeof(cert_obj.label)); 423 424 cert_obj.flags = SC_PKCS15_CO_FLAG_MODIFIABLE; 424 425 … … 546 547 cert_info.authority = (i == 2); 547 548 548 str ncpy(cert_obj.label, certLabel, SC_PKCS15_MAX_LABEL_SIZE - 1);549 strlcpy(cert_obj.label, certLabel, sizeof(cert_obj.label)); 549 550 cert_obj.flags = SC_PKCS15_CO_FLAG_MODIFIABLE; 550 551
