Package: ploticus Version: 2.42-4 Severity: important Tags: patch upstream Dear Maintainer,
Lines are sometimes drawn with one end extending to lower left. Rendering the same input might usually look fine, but fail randomly. Example input and output of 100 iterations attached. The cause seems to be reading outside of allocated memory on line execline.c:489. This leads to a wrong argument count causing the following warning: pl proc line: 2959: warning: points must have either 4 or 2 values per line -- System Information: Debian Release: buster/sid APT prefers bionic-updates APT policy: (500, 'bionic-updates'), (500, 'bionic-security'), (500, 'bionic'), (100, 'bionic-backports') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 4.15.0-36-generic (SMP w/3 CPU cores) Locale: LANG=fi_FI.UTF-8, LC_CTYPE=fi_FI.UTF-8 (charmap=UTF-8), LANGUAGE=fi_FI.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled Versions of packages ploticus depends on: ii libc6 2.27-3ubuntu1 ii libgd3 2.2.5-4ubuntu0.2 ii libx11-6 2:1.6.4-3ubuntu0.1 ii zlib1g 1:1.2.11.dfsg-0ubuntu2 ploticus recommends no packages. ploticus suggests no packages.
#proc page dopagebox: yes pagesize: 3.380 0.600 #proc areadef rectangle: 0.010 0.010 3.37 0.59 yscaletype: linear yrange: 0 60 xscaletype: linear xrange: 0.999 2.000 #saveas: A #proc legendentry sampletype: color details: rgb(0,0.6,0) tag: barcoldefault #proc legendentry sampletype: color details: black tag: black #proc legendentry sampletype: color details: rgb(0.9,0.3,0.3) tag: dummy0 #proc legendentry sampletype: color details: rgb(0.9,0.3,0.3) tag: dummy1 #proc legendentry sampletype: color details: rgb(0.9,0.3,0.3) tag: dummy2 #proc legendentry sampletype: color details: rgb(0.9,0.3,0.3) tag: dummy3 #proc legendentry sampletype: color details: rgb(0.9,0.3,0.3) tag: dummy4 #proc legendentry sampletype: color details: rgb(0.9,0.3,0.3) tag: dummy5 #proc legendentry sampletype: color details: gray(0.0) tag: s #proc legendentry sampletype: color details: rgb(0.9,0.3,0.3) tag: sx #proc legendentry sampletype: color details: gray(0.5) tag: textcol #proc legendentry sampletype: color details: gray(1) tag: w #proc legendentry sampletype: color details: gray(0.999) tag: white #proc legendentry sampletype: color details: rgb(1,0.7,0.7) tag: wx #proc line linedetails: width=10 color=rgb(1,0.7,0.7) style=0 points: 0.050 0(s)+0.05 0.050 60(s)-0.05 #proc line linedetails: width=10 color=rgb(1,0.7,0.7) style=0 points: 0.095 0(s)+0.05 0.095 60(s)-0.05 #proc line linedetails: width=10 color=rgb(1,0.7,0.7) style=0 points: 0.170 0(s)+0.05 0.170 60(s)-0.05 #proc line linedetails: width=10 color=rgb(1,0.7,0.7) style=0 points: 0.215 0(s)+0.05 0.215 60(s)-0.05 #proc line linedetails: width=10 color=rgb(1,0.7,0.7) style=0 points: 0.530 0(s)+0.05 0.530 60(s)-0.05 #proc line linedetails: width=10 color=rgb(1,0.7,0.7) style=0 points: 0.575 0(s)+0.05 0.575 60(s)-0.05 #proc line linedetails: width=10 color=rgb(1,0.7,0.7) style=0 points: 0.650 0(s)+0.05 0.650 60(s)-0.05 #proc line linedetails: width=10 color=rgb(1,0.7,0.7) style=0 points: 0.695 0(s)+0.05 0.695 60(s)-0.05 #proc line linedetails: width=10 color=rgb(1,0.7,0.7) style=0 points: 1.010 0(s)+0.05 1.010 60(s)-0.05 #proc line linedetails: width=10 color=rgb(1,0.7,0.7) style=0 points: 1.055 0(s)+0.05 1.055 60(s)-0.05 #proc line linedetails: width=10 color=rgb(1,0.7,0.7) style=0 points: 1.130 0(s)+0.05 1.130 60(s)-0.05 #proc line linedetails: width=10 color=rgb(1,0.7,0.7) style=0 points: 1.175 0(s)+0.05 1.175 60(s)-0.05 #proc line linedetails: width=10 color=rgb(1,0.7,0.7) style=0 points: 2.450 0(s)+0.05 2.450 60(s)-0.05 #proc line linedetails: width=10 color=rgb(1,0.7,0.7) style=0 points: 2.495 0(s)+0.05 2.495 60(s)-0.05 #proc line linedetails: width=10 color=rgb(1,0.7,0.7) style=0 points: 2.570 0(s)+0.05 2.570 60(s)-0.05 #proc line linedetails: width=10 color=rgb(1,0.7,0.7) style=0 points: 2.615 0(s)+0.05 2.615 60(s)-0.05 #proc line linedetails: width=10 color=rgb(1,0.7,0.7) style=0 points: 2.930 0(s)+0.05 2.930 60(s)-0.05 #proc line linedetails: width=10 color=rgb(1,0.7,0.7) style=0 points: 2.975 0(s)+0.05 2.975 60(s)-0.05 #proc line linedetails: width=10 color=rgb(1,0.7,0.7) style=0 points: 3.050 0(s)+0.05 3.050 60(s)-0.05 #proc line linedetails: width=10 color=rgb(1,0.7,0.7) style=0 points: 3.095 0(s)+0.05 3.095 60(s)-0.05 #proc line linedetails: width=0.2 color=black style=0 points: 0.010 2(s)+0.001 0.010 60(s)-0.001 #proc line linedetails: width=0.2 color=black style=0 points: 0.250 2(s)+0.001 0.250 60(s)-0.001 #proc line linedetails: width=0.2 color=black style=0 points: 0.490 2(s)+0.001 0.490 60(s)-0.001 #proc line linedetails: width=0.2 color=black style=0 points: 0.730 2(s)+0.001 0.730 60(s)-0.001 #proc line linedetails: width=0.2 color=black style=0 points: 0.970 2(s)+0.001 0.970 60(s)-0.001 #proc line linedetails: width=0.2 color=black style=0 points: 1.210 2(s)+0.001 1.210 60(s)-0.001 #proc line linedetails: width=0.2 color=black style=0 points: 1.450 2(s)+0.001 1.450 60(s)-0.001 #proc line linedetails: width=0.2 color=black style=0 points: 1.690 2(s)+0.001 1.690 60(s)-0.001 #proc line linedetails: width=0.2 color=black style=0 points: 1.930 2(s)+0.001 1.930 60(s)-0.001 #proc line linedetails: width=0.2 color=black style=0 points: 2.170 2(s)+0.001 2.170 60(s)-0.001 #proc line linedetails: width=0.2 color=black style=0 points: 2.410 2(s)+0.001 2.410 60(s)-0.001 #proc line linedetails: width=0.2 color=black style=0 points: 2.650 2(s)+0.001 2.650 60(s)-0.001 #proc line linedetails: width=0.2 color=black style=0 points: 2.890 2(s)+0.001 2.890 60(s)-0.001 #proc line linedetails: width=0.2 color=black style=0 points: 3.130 2(s)+0.001 3.130 60(s)-0.001 #proc line linedetails: width=0.2 color=black style=0 points: 3.370 2(s)+0.001 3.370 60(s)-0.001 #proc line linedetails: width=6 color=gray(0.0) style=0 points: 0.220 24(s)+0.03 0.220 60(s)-0.03 #proc line linedetails: width=6 color=gray(0.0) style=0 points: 0.280 24(s)+0.03 0.280 60(s)-0.03 #proc line linedetails: width=6 color=gray(0.0) style=0 points: 0.460 24(s)+0.03 0.460 60(s)-0.03 #proc line linedetails: width=6 color=gray(0.0) style=0 points: 0.520 24(s)+0.03 0.520 60(s)-0.03 #proc line linedetails: width=6 color=gray(0.0) style=0 points: 0.940 24(s)+0.03 0.940 60(s)-0.03 #proc line linedetails: width=6 color=gray(0.0) style=0 points: 1.000 24(s)+0.03 1.000 60(s)-0.03 #proc line linedetails: width=6 color=gray(0.0) style=0 points: 1.180 24(s)+0.03 1.180 60(s)-0.03 #proc line linedetails: width=6 color=gray(0.0) style=0 points: 1.240 24(s)+0.03 1.240 60(s)-0.03 #proc line linedetails: width=6 color=rgb(0.9,0.3,0.3) style=0 points: 1.420 24(s)+0.03 1.420 60(s)-0.03 #proc line linedetails: width=6 color=rgb(0.9,0.3,0.3) style=0 points: 1.480 24(s)+0.03 1.480 60(s)-0.03 #proc line linedetails: width=6 color=gray(0.0) style=0 points: 1.900 24(s)+0.03 1.900 60(s)-0.03 #proc line linedetails: width=6 color=gray(0.0) style=0 points: 1.960 24(s)+0.03 1.960 60(s)-0.03 #proc line linedetails: width=6 color=rgb(0.9,0.3,0.3) style=0 points: 2.140 24(s)+0.03 2.140 60(s)-0.03 #proc line linedetails: width=6 color=rgb(0.9,0.3,0.3) style=0 points: 2.200 24(s)+0.03 2.200 60(s)-0.03 #proc line linedetails: width=6 color=gray(0.0) style=0 points: 2.620 24(s)+0.03 2.620 60(s)-0.03 #proc line linedetails: width=6 color=gray(0.0) style=0 points: 2.680 24(s)+0.03 2.680 60(s)-0.03 #proc line linedetails: width=6 color=gray(0.0) style=0 points: 2.860 24(s)+0.03 2.860 60(s)-0.03 #proc line linedetails: width=6 color=gray(0.0) style=0 points: 2.920 24(s)+0.03 2.920 60(s)-0.03 #proc line linedetails: width=6 color=gray(0.0) style=0 points: 3.100 24(s)+0.03 3.100 60(s)-0.03 #proc line linedetails: width=6 color=gray(0.0) style=0 points: 3.160 24(s)+0.03 3.160 60(s)-0.03 #proc line linedetails: width=0.2 color=black style=0 points: 0.011 2(s) 3.369 2(s) #proc line linedetails: width=0.2 color=black style=0 points: 0.011 59(s) 3.369 59(s) #proc annotate location: 0.08 0.04 textdetails: align=center size=8 color=gray(0.5) text: c #proc annotate location: 0.32 0.04 textdetails: align=center size=8 color=gray(0.5) text: d #proc annotate location: 0.56 0.04 textdetails: align=center size=8 color=gray(0.5) text: e #proc annotate location: 0.8 0.04 textdetails: align=center size=8 color=gray(0.5) text: f #proc annotate location: 1.04 0.04 textdetails: align=center size=8 color=gray(0.5) text: g #proc annotate location: 1.28 0.04 textdetails: align=center size=8 color=gray(0.5) text: a #proc annotate location: 1.52 0.04 textdetails: align=center size=8 color=gray(0.5) text: b #proc annotate location: 1.76 0.04 textdetails: align=center size=8 color=gray(0.5) text: c #proc annotate location: 2 0.04 textdetails: align=center size=8 color=gray(0.5) text: d #proc annotate location: 2.24 0.04 textdetails: align=center size=8 color=gray(0.5) text: e #proc annotate location: 2.48 0.04 textdetails: align=center size=8 color=gray(0.5) text: f #proc annotate location: 2.72 0.04 textdetails: align=center size=8 color=gray(0.5) text: g #proc annotate location: 2.96 0.04 textdetails: align=center size=8 color=gray(0.5) text: a #proc annotate location: 3.2 0.04 textdetails: align=center size=8 color=gray(0.5) text: b #endproc
diff --git a/pl241src/src/execline.c b/pl241src/src/execline.c index b733c74..63d5675 100644 --- a/pl241src/src/execline.c +++ b/pl241src/src/execline.c @@ -457,7 +457,7 @@ txtstartline = PLL.curline; txtlen = strlen( firstline ); /* go until we hit an empty line, or reach end of proc.. */ -for( iline = txtstartline; iline <= procstop ; iline++ ) { +for( iline = txtstartline; iline < procstop ; iline++ ) { line = PLL.procline[ iline ]; for( i = 0, emptyline = 1; line[i] != '\0'; i++ ) if( !isspace( (int) line[i] )) { emptyline = 0; break; } if( emptyline ) break; @@ -485,7 +485,7 @@ if( firstline[i] != '\0' ) { /* now fill mem.. */ -for( iline = txtstartline; iline < txtstopline && iline <= procstop; iline++ ) { +for( iline = txtstartline; iline < txtstopline; iline++ ) { line = PLL.procline[ iline ]; /* skip over leading whitespace as well as any leading backslash.. */ diff --git a/pl241src/src/proc_line.c b/pl241src/src/proc_line.c index 166321f..af41aad 100644 --- a/pl241src/src/proc_line.c +++ b/pl241src/src/proc_line.c @@ -19,7 +19,7 @@ int lvp, first; char buf[256]; double x, y, ancx, ancy; -char *linedetails, *drawpoints; +char *linedetails, *drawpoints = NULL; char notation; char a[40], b[40], c[40], d[40]; int nt, ix, buflen, ancgiven;