$OpenBSD: patch-sanyo_c,v 1.2 2005/11/14 17:39:03 pvalchev Exp $ --- sanyo.c.orig 2004-05-03 11:50:01.000000000 -0700 +++ sanyo.c 2004-05-03 11:58:29.000000000 -0700 @@ -318,7 +318,7 @@ sanyo_prop(struct exifprop *prop, struct (u_int16_t)((prop->value >> 8) & 0xff)); c2 = finddescr(sanyo_res, (u_int16_t)(prop->value & 0xff)); exifstralloc(&prop->str, strlen(c1) + strlen(c2) + 3); - sprintf(prop->str, "%s, %s", c1, c2); + snprintf(prop->str, (strlen(c1) + strlen(c2) + 3), "%s, %s", c1, c2); free(c1); free(c2); break; @@ -330,9 +330,9 @@ sanyo_prop(struct exifprop *prop, struct b = exif4byte(t->md.btiff + prop->value + 4, t->md.order); if (!a || !b || a == b) - snprintf(prop->str, 31, "None"); + snprintf(prop->str, PROPSTR_SIZE, "None"); else - snprintf(prop->str, 31, "x%.1f", (float)a / (float)b); + snprintf(prop->str, PROPSTR_SIZE, "x%.1f", (float)a / (float)b); break; /* Color adjust. */