From: Matthieu C. <ma...@us...> - 2003-08-29 09:36:24
|
Update of /cvsroot/libexif/libmnote/libmnote/olympus In directory sc8-pr-cvs1:/tmp/cvs-serv3738/libmnote/olympus Modified Files: mnote-olympus-entry.c Log Message: strncat fixe Index: mnote-olympus-entry.c =================================================================== RCS file: /cvsroot/libexif/libmnote/libmnote/olympus/mnote-olympus-entry.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- mnote-olympus-entry.c 24 Jul 2003 20:18:11 -0000 1.5 +++ mnote-olympus-entry.c 29 Aug 2003 09:36:19 -0000 1.6 @@ -184,28 +184,32 @@ snprintf (buf, sizeof (buf), "%li", vl); strncpy (v, buf, sizeof (v)); } - strncat (v, "/", sizeof (v)); + strncat (v, "/", sizeof (v) - 1 - strlen(v)); vl = exif_get_long (entry->data + 4, order); snprintf (buf, sizeof (buf), "%li", vl); - strncat (v, buf, sizeof (v)); - strncat (v, "/", sizeof (v)); + strncat (v, buf, sizeof (v) - 1 - strlen(v)); + strncat (v, "/", sizeof (v) - 1 - strlen(v)); vl = exif_get_long (entry->data + 4, order); switch (vl) { case 1: - strncat (v, _("left to right"), sizeof (v)); + strncat (v, _("left to right"), + sizeof (v) - 1 - strlen(v)); break; case 2: - strncat (v, _("right to left"), sizeof (v)); + strncat (v, _("right to left"), + sizeof (v) - 1 - strlen(v)); break; case 3: - strncat (v, _("bottom to top"), sizeof (v)); + strncat (v, _("bottom to top"), + sizeof (v) - 1 - strlen(v)); break; case 4: - strncat (v, _("top to bottom"), sizeof (v)); + strncat (v, _("top to bottom"), + sizeof (v) - 1 - strlen(v)); break; default: snprintf (buf, sizeof (buf), "%li", vl); - strncat (v, buf, sizeof (v)); + strncat (v, buf, sizeof (v) - 1 - strlen(v)); } break; case MNOTE_OLYMPUS_TAG_QUALITY: |