Package: x42-plugins
Version: 20150702-1

Hello:

Someone at the #debian-multimedia channel dropped this report

<olinuxx> Hi guys, I've a bug to report against x42-plugins
<olinuxx> the meters, both as LV2 or standalone app (x42-meter) who
are normaly displaying a needle are segfaulting
<olinuxx> using them in ardour crash it
<olinuxx> the error log is : x42-meter: ./gui/needle.c:118: void
img2surf(const MyGimpImage*, cairo_surface_t**, unsigned char**):
Assertion `ys + xs < (img->width * img->height +
img->bytes_per_pixel)' failed.
<olinuxx> (you can get it trying "x42-meter 6" as an example)
<olinuxx> this is the case with a fresh Jessie install with the
backport from stretch, as well as a fresh Stretch install
<olinuxx> I didn't looked deep yet into BTS reporting, so I'm putting
that here, hopefully, someone will pick it up

I looked at the source and the fix is trivial. It should be "*" and
not "+" as in:
-assert (ys + xs < (img->width * img->height + img->bytes_per_pixel));
+assert (ys + xs < (img->width * img->height * img->bytes_per_pixel));

ys + xs is a sequence that accumulates the total number of bytes and it goes

img->bytes_per_pixel, img->bytes_per_pixel*1, img->bytes_per_pixel*2, ...
img->bytes_per_pixel*(img->width * img->height -1)

It seems upstream wanted to bound ys + xs by the next value in the
sequence which is (img->width * img->height * img->bytes_per_pixel).
This makes the assertion always true since it will be short of the
upper bound by at least img->bytes_per_pixel.

Upstream's commit suggest that there may be another issue
https://github.com/x42/meters.lv2/commit/70497bb8b77aa5ddf13801b0a1472525cfbe42e7
with array boundaries but that is independent of this report.

I have never run or compiled  these plugins but the math seems to add
up. Hope my pseudo-patch helps.

Cheers,
Miguel

_______________________________________________
pkg-multimedia-maintainers mailing list
pkg-multimedia-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-multimedia-maintainers

Reply via email to