patch-wm_helpers_c 719 B

12345678910111213141516171819202122
  1. $OpenBSD: patch-wm_helpers_c,v 1.1.1.1 2001/02/06 11:50:21 wilfried Exp $
  2. --- wm_helpers.c.orig Sun Mar 7 09:36:41 1999
  3. +++ wm_helpers.c Mon Feb 5 14:52:48 2001
  4. @@ -30,7 +30,7 @@ static char wm_helpers_id[] = "$Id: wm_h
  5. #include <stdio.h>
  6. #include <string.h>
  7. -#include <malloc.h>
  8. +#include <stdlib.h>
  9. #include <errno.h>
  10. #include <stdarg.h>
  11. #include <sys/time.h>
  12. @@ -63,7 +63,7 @@ char *wm_libver_number( void )
  13. s = malloc(10);
  14. /* this is not used very often, so don't care about speed...*/
  15. - sprintf(s, "%d.%d.%d", wm_libver_major(), wm_libver_minor(), wm_libver_pl());
  16. + snprintf(s, sizeof(s), "%d.%d.%d", wm_libver_major(), wm_libver_minor(), wm_libver_pl());
  17. return s;
  18. } /* wm_libver_number() */