diff --git a/src/actions.cpp b/src/actions.cpp index 967ba1bc..ff9f28b0 100644 --- a/src/actions.cpp +++ b/src/actions.cpp @@ -2050,8 +2050,8 @@ namespace { pthread_mutex_lock( &cs ); std::string tmp = "/tmp/"; #endif - char sCount[12]; - sprintf(sCount,"_%d",++count); + char sCount[13]; + sprintf(sCount,"_%d",++count); /// \todo replace by std::snprintf on master std::string result = tmp + Exiv2::toString(pid) + sCount ; if ( Exiv2::fileExists(result) ) std::remove(result.c_str()); diff --git a/src/jpgimage.cpp b/src/jpgimage.cpp index 48ba2466..b9e724c1 100644 --- a/src/jpgimage.cpp +++ b/src/jpgimage.cpp @@ -602,7 +602,8 @@ namespace Exiv2 { // 0xc0 .. 0xcf are SOFn (except 4) nm[0xc4] = "DHT"; for (int i = 0; i <= 15; i++) { - char MN[10]; + char MN[16]; + /// \todo to be replaced by std::snprintf on master (only available in c++11) sprintf(MN, "APP%d", i); nm[0xe0 + i] = MN; if (i != 4) {