Edit

IABSD.fr/ports/graphics/exiv2/patches/patch-src_value_cpp

Branch :

  • Show log

    Commit

  • Author : landry
    Date : 2010-07-12 08:55:38
    Hash : 3fbe0278
    Message : Update to exiv2 0.20. ok sthen@ espie@

  • graphics/exiv2/patches/patch-src_value_cpp
  • $OpenBSD: patch-src_value_cpp,v 1.4 2010/07/12 08:55:38 landry Exp $
    --- src/value.cpp.orig	Wed Apr 14 18:17:55 2010
    +++ src/value.cpp	Thu Jul  1 22:45:05 2010
    @@ -971,7 +971,7 @@ namespace Exiv2 {
             // sprintf wants to add the null terminator, so use oversized buffer
             char temp[9];
     
    -        int wrote = sprintf(temp, "%04d%02d%02d",
    +        int wrote = snprintf(temp, sizeof temp, "%04d%02d%02d",
                                 date_.year, date_.month, date_.day);
             assert(wrote == 8);
             std::memcpy(buf, temp, 8);
    @@ -1143,7 +1143,7 @@ namespace Exiv2 {
             char plusMinus = '+';
             if (time_.tzHour < 0 || time_.tzMinute < 0) plusMinus = '-';
     
    -        int wrote = sprintf(temp,
    +        int wrote = snprintf(temp, sizeof temp,
                        "%02d%02d%02d%1c%02d%02d",
                        time_.hour, time_.minute, time_.second,
                        plusMinus, abs(time_.tzHour), abs(time_.tzMinute));