diff options
author | android-build-team Robot <android-build-team-robot@google.com> | 2020-03-19 04:53:29 +0000 |
---|---|---|
committer | android-build-team Robot <android-build-team-robot@google.com> | 2020-03-19 04:53:29 +0000 |
commit | 743914bd6810af7d9057dc659424fc2ca49088a1 (patch) | |
tree | f32bad25a377b5b4605c619055abaffc467411a8 | |
parent | 1a6756b78ad1c7fca57cb8521081fc01181e8f83 (diff) | |
parent | 0335ffc17f9b9a4831c242bb08ea92f605fde7a6 (diff) | |
download | libexif-android10-qpr2-s2-release.tar.gz |
Merge cherrypicks of [10745155, 10743283, 10746098, 10735615, 10743284, 10745369, 10745156, 10745157, 10746136, 10746137, 10745215, 10746138, 10745216, 10745217, 10746139, 10745218, 10743285, 10746118, 10746119, 10745827, 10745158, 10745159, 10743224, 10743225, 10745492] into qt-qpr2-releaseandroid-10.0.0_r36android-10.0.0_r35android-10.0.0_r34android10-qpr2-s4-releaseandroid10-qpr2-s3-releaseandroid10-qpr2-s2-release
Change-Id: I4e8d880831ecccaffd26f39da615e8e980d9e3b4
-rw-r--r-- | libexif/exif-data.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libexif/exif-data.c b/libexif/exif-data.c index adfb512..b81b8ce 100644 --- a/libexif/exif-data.c +++ b/libexif/exif-data.c @@ -299,7 +299,9 @@ exif_data_save_data_entry (ExifData *data, ExifEntry *e, /* Write the data. Fill unneeded bytes with 0. Do not crash with * e->data is NULL */ if (e->data) { - memcpy (*d + 6 + doff, e->data, s); + unsigned int len = s; + if (e->size < s) len = e->size; + memcpy (*d + 6 + doff, e->data, len); } else { memset (*d + 6 + doff, 0, s); } |