From 6aaa8da03524ff3c22c5ee133c03c02f4160e5ca Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Thu, 1 Jun 2017 14:32:26 +0200 Subject: [PATCH] avoid potential sprintf overflow (GCC7) --- camlibs/ptp2/config.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/camlibs/ptp2/config.c b/camlibs/ptp2/config.c index fae3d66542..99896e661c 100644 --- a/camlibs/ptp2/config.c +++ b/camlibs/ptp2/config.c @@ -1605,7 +1605,7 @@ _put_ImageSize(CONFIG_PUT_ARGS) { static int _get_ExpCompensation(CONFIG_GET_ARGS) { int j; - char buf[10]; + char buf[13]; if (!(dpd->FormFlag & PTP_DPFF_Enumeration)) return GP_ERROR; @@ -7710,7 +7710,7 @@ _get_config (Camera *camera, const char *confname, CameraWidget **outwidget, Cam for (i=0;ideviceinfo.DevicePropertiesSupported_len;i++) { uint16_t propid = params->deviceinfo.DevicePropertiesSupported[i]; - char buf[20], *label; + char buf[21], *label; PTPDevicePropDesc dpd; CameraWidgetType type;