patch-lib_XimpProto_c 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. $OpenBSD: patch-lib_XimpProto_c,v 1.1.1.1 2000/04/26 00:43:13 espie Exp $
  2. --- lib/XimpProto.c.orig Thu May 27 01:55:25 1999
  3. +++ lib/XimpProto.c Wed Apr 26 02:18:48 2000
  4. @@ -387,9 +387,9 @@ XimpProtocolWidget xpw;
  5. char buf[256];
  6. #define MAKEATOM(s) XInternAtom(dpy, s, False)
  7. - (void)sprintf(buf, "_XIMP_%s", xpw->ximp.localename);
  8. + (void)snprintf(buf, sizeof(buf), "_XIMP_%s", xpw->ximp.localename);
  9. xpw->ximp.selAtom1 = MAKEATOM(buf);
  10. - (void)sprintf(buf, "_XIMP_%s@%s.%d",
  11. + (void)snprintf(buf, sizeof(buf), "_XIMP_%s@%s.%d",
  12. xpw->ximp.localename,
  13. xpw->ximp.servername,
  14. DefaultScreen(XtDisplay((Widget)xpw)));
  15. @@ -474,17 +474,17 @@ Window client;
  16. char buf[30];
  17. ccp = XtNew(ConvClient);
  18. - (void)sprintf(buf, "_XIMP_STRING_%d", xpw->ximp.propid++);
  19. + (void)snprintf(buf, sizeof(buf), "_XIMP_STRING_%d", xpw->ximp.propid++);
  20. ccp->property = XInternAtom(XtDisplay((Widget)xpw), buf, False);
  21. - (void)sprintf(buf, "_XIMP_CALLBACKS_%d", xpw->ximp.callbackpropid++);
  22. + (void)snprintf(buf, sizeof(buf), "_XIMP_CALLBACKS_%d", xpw->ximp.callbackpropid++);
  23. ccp->preeditdata = XInternAtom(XtDisplay((Widget)xpw), buf, False);
  24. - (void)sprintf(buf, "_XIMP_CALLBACKS_%d", xpw->ximp.callbackpropid++);
  25. + (void)snprintf(buf, sizeof(buf), "_XIMP_CALLBACKS_%d", xpw->ximp.callbackpropid++);
  26. ccp->preedittext = XInternAtom(XtDisplay((Widget)xpw), buf, False);
  27. - (void)sprintf(buf, "_XIMP_CALLBACKS_%d", xpw->ximp.callbackpropid++);
  28. + (void)snprintf(buf, sizeof(buf), "_XIMP_CALLBACKS_%d", xpw->ximp.callbackpropid++);
  29. ccp->preeditfeedback = XInternAtom(XtDisplay((Widget)xpw), buf, False);
  30. - (void)sprintf(buf, "_XIMP_CALLBACKS_%d", xpw->ximp.callbackpropid++);
  31. + (void)snprintf(buf, sizeof(buf), "_XIMP_CALLBACKS_%d", xpw->ximp.callbackpropid++);
  32. ccp->statustext = XInternAtom(XtDisplay((Widget)xpw), buf, False);
  33. - (void)sprintf(buf, "_XIMP_CALLBACKS_%d", xpw->ximp.callbackpropid++);
  34. + (void)snprintf(buf, sizeof(buf), "_XIMP_CALLBACKS_%d", xpw->ximp.callbackpropid++);
  35. ccp->statusfeedback = XInternAtom(XtDisplay((Widget)xpw), buf, False);
  36. }
  37. ccp->id = xpw->ximp.icid++;