mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-07-10 08:12:33 +03:00
Replace strncpy with strcpy
This commit is contained in:
parent
7e15c54cad
commit
520b99937a
|
@ -61,7 +61,6 @@ export_named_type(struct ArrowSchema *schema, char *format, char *name) {
|
||||||
size_t name_len = strlen(name) + 1;
|
size_t name_len = strlen(name) + 1;
|
||||||
|
|
||||||
formatp = calloc(format_len, 1);
|
formatp = calloc(format_len, 1);
|
||||||
|
|
||||||
if (!formatp) {
|
if (!formatp) {
|
||||||
return IMAGING_CODEC_MEMORY;
|
return IMAGING_CODEC_MEMORY;
|
||||||
}
|
}
|
||||||
|
@ -72,8 +71,8 @@ export_named_type(struct ArrowSchema *schema, char *format, char *name) {
|
||||||
return IMAGING_CODEC_MEMORY;
|
return IMAGING_CODEC_MEMORY;
|
||||||
}
|
}
|
||||||
|
|
||||||
strncpy(formatp, format, format_len);
|
strcpy(formatp, format);
|
||||||
strncpy(namep, name, name_len);
|
strcpy(namep, name);
|
||||||
|
|
||||||
*schema = (struct ArrowSchema){// Type description
|
*schema = (struct ArrowSchema){// Type description
|
||||||
.format = formatp,
|
.format = formatp,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user