patch-manage_c 571 B

123456789101112131415161718192021
  1. $OpenBSD: patch-manage_c,v 1.3 2005/10/21 20:07:05 naddy Exp $
  2. --- manage.c.orig Mon May 6 06:33:21 2002
  3. +++ manage.c Thu Oct 20 07:23:02 2005
  4. @@ -17,7 +17,6 @@
  5. #include <stdio.h>
  6. #include <stdlib.h>
  7. -#include <malloc.h>
  8. /*
  9. #include <X11/Xlib.h>
  10. #include <X11/Xutil.h>
  11. @@ -393,7 +392,7 @@ PlayerData *NewPlayerData(void)
  12. New = (PlayerData *)malloc(sizeof(PlayerData));
  13. - sprintf(New->Rec[0].name,name);
  14. + snprintf(New->Rec[0].name, sizeof(New->Rec[0].name), name);
  15. New->Rec[0].score = 0;
  16. New->Rec[0].stage = 0;
  17. New->Rec[0].loop = 0;