File: fix-undefined-use-of-sprintf.patch

package info (click to toggle)
motif 2.3.8-5
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 36,432 kB
  • sloc: ansic: 452,643; sh: 4,613; makefile: 2,030; yacc: 1,604; lex: 352; cpp: 348
file content (17 lines) | stat: -rw-r--r-- 649 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Description: Fix undefined use of sprintf
 This patch fixes the undefined use of sprintf when the
 source and destination buffers overlap.
Author: Graham Inggs <ginggs@debian.org>
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--;