Skip to content

Commit 1e2306b

Browse files
authored
ext/exif: moving few instances from memmove to memcpy. (#14400)
1 parent 61191dc commit 1e2306b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

ext/exif/exif.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2805,7 +2805,7 @@ static void* exif_ifd_make_value(image_info_data *info_data, int motorola_intel)
28052805
if (info_data->format == TAG_FMT_UNDEFINED || info_data->format == TAG_FMT_STRING
28062806
|| (byte_count>1 && (info_data->format == TAG_FMT_BYTE || info_data->format == TAG_FMT_SBYTE))
28072807
) {
2808-
memmove(value_ptr, info_data->value.s, byte_count);
2808+
memcpy(value_ptr, info_data->value.s, byte_count);
28092809
return value_ptr;
28102810
} else if (info_data->format == TAG_FMT_BYTE) {
28112811
*value_ptr = info_data->value.u;
@@ -2849,11 +2849,11 @@ static void* exif_ifd_make_value(image_info_data *info_data, int motorola_intel)
28492849
data_ptr += 8;
28502850
break;
28512851
case TAG_FMT_SINGLE:
2852-
memmove(data_ptr, &info_value->f, 4);
2852+
memcpy(data_ptr, &info_value->f, 4);
28532853
data_ptr += 4;
28542854
break;
28552855
case TAG_FMT_DOUBLE:
2856-
memmove(data_ptr, &info_value->d, 8);
2856+
memcpy(data_ptr, &info_value->d, 8);
28572857
data_ptr += 8;
28582858
break;
28592859
}
@@ -2906,9 +2906,9 @@ static void exif_thumbnail_build(image_info_type *ImageInfo) {
29062906
ImageInfo->Thumbnail.size += new_size;
29072907
/* fill in data */
29082908
if (ImageInfo->motorola_intel) {
2909-
memmove(new_data, "MM\x00\x2a\x00\x00\x00\x08", 8);
2909+
memcpy(new_data, "MM\x00\x2a\x00\x00\x00\x08", 8);
29102910
} else {
2911-
memmove(new_data, "II\x2a\x00\x08\x00\x00\x00", 8);
2911+
memcpy(new_data, "II\x2a\x00\x08\x00\x00\x00", 8);
29122912
}
29132913
new_data += 8;
29142914
php_ifd_set16u(new_data, info_list->count, ImageInfo->motorola_intel);

0 commit comments

Comments
 (0)