$OpenBSD: patch-wrrle_c,v 1.1 2005/04/03 23:26:22 brad Exp $

cmapcomment is a local array, we can use sizeof.

--- wrrle.c.orig	Sun Mar 27 03:48:15 2005
+++ wrrle.c	Sun Mar 27 03:49:32 2005
@@ -199,7 +199,8 @@ finish_output_rle (j_decompress_ptr cinf
     header.cmaplen = CMAPBITS;
     header.cmap    = dest->colormap;
     /* Add a comment to the output image with the true colormap length. */
-    sprintf(cmapcomment, "color_map_length=%d", cinfo->actual_number_of_colors);
+    snprintf(cmapcomment, sizeof cmapcomment,
+             "color_map_length=%d", cinfo->actual_number_of_colors);
     rle_putcom(cmapcomment, &header);
   }
 
