$OpenBSD: patch-gpal_codegen14_c,v 1.1 2004/01/30 01:01:11 naddy Exp $ --- gpal/codegen14.c.orig 2004-01-26 10:43:13.000000000 +1100 +++ gpal/codegen14.c 2004-01-26 10:43:55.000000000 +1100 @@ -80,9 +80,9 @@ load_file14(char *name, enum size_tag si if (offset == 0) { offset_buffer[0] = '\0'; } else if (offset < 0) { - sprintf(offset_buffer, " - %#x", -offset); + snprintf(offset_buffer, sizeof(offset_buffer), " - %#x", -offset); } else { - sprintf(offset_buffer, " + %#x", offset); + snprintf(offset_buffer, sizeof(offset_buffer), " + %#x", offset); } /* W is used as the working register for single byte types. */ @@ -134,9 +134,9 @@ store_file14(char *name, enum size_tag s if (offset == 0) { offset_buffer[0] = '\0'; } else if (offset < 0) { - sprintf(offset_buffer, " - %#x", -offset); + snprintf(offset_buffer, sizeof(offset_buffer), " - %#x", -offset); } else { - sprintf(offset_buffer, " + %#x", offset); + snprintf(offset_buffer, sizeof(offset_buffer), " + %#x", offset); } if ((size == size_int8) || (size == size_uint8)) {