1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-26 04:35:39 +03:00
aports/community/motif/16-fix-undefined-use-of-sprintf.patch
2020-02-25 00:04:11 -03:00

17 lines
651 B
Diff

Description: Fix undefined use of sprintf
This patch fixes the undefined use of sprintf when the
source and destination buffers overlap.
Author: Graham Inggs <graham@nerve.org.za>
Forwarded: http://bugs.motifzone.net/show_bug.cgi?id=1628
Last-Update: 2013-09-24
--- a/lib/Xm/XmRenderT.c
+++ b/lib/Xm/XmRenderT.c
@@ -2703,7 +2703,7 @@
number = tlist -> count;
tab = (_XmTab) tlist -> start;
while(number > 0) {
- sprintf(temp, "%s %f %d %d %d, ", temp, tab -> value,
+ sprintf(temp + strlen(temp), " %f %d %d %d, ", tab -> value,
tab -> units, tab -> alignment, tab -> offsetModel);
tab = (_XmTab) tab -> next;
number--;