From 337c2ab7121e4df3a0c67d0ec847dec06f4b5c6fc0f54023370001fe9ac6b116 Mon Sep 17 00:00:00 2001 From: Stefan Dirsch Date: Tue, 27 May 2014 12:05:25 +0000 Subject: [PATCH] Accepting request 235536 from home:tiwai:branches:X11:XOrg - Fix zero-division with empty height (bnc#879462) u_mesa-gallium-llvmpipe-fix-SIGFPE.patch OBS-URL: https://build.opensuse.org/request/show/235536 OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/Mesa?expand=0&rev=378 --- Mesa.changes | 6 ++++++ Mesa.spec | 3 +++ u_mesa-gallium-llvmpipe-fix-SIGFPE.patch | 24 ++++++++++++++++++++++++ 3 files changed, 33 insertions(+) create mode 100644 u_mesa-gallium-llvmpipe-fix-SIGFPE.patch diff --git a/Mesa.changes b/Mesa.changes index 9e66b88..cf79a28 100644 --- a/Mesa.changes +++ b/Mesa.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue May 27 13:39:00 CEST 2014 - tiwai@suse.de + +- Fix zero-division with empty height (bnc#879462) + u_mesa-gallium-llvmpipe-fix-SIGFPE.patch + ------------------------------------------------------------------- Mon May 26 23:36:44 UTC 2014 - tobias.johannes.klausmann@mni.thm.de diff --git a/Mesa.spec b/Mesa.spec index 331afcd..17d7f88 100644 --- a/Mesa.spec +++ b/Mesa.spec @@ -149,6 +149,8 @@ Patch11: u_Fix-crash-in-swrast-when-setting-a-texture-for-a-pix.patch Patch13: u_mesa-8.0.1-fix-16bpp.patch # Patch from Fedora, use shmget when available, under llvmpipe Patch15: u_mesa-8.0-llvmpipe-shmget.patch +# to be upstreamed +Patch16: u_mesa-gallium-llvmpipe-fix-SIGFPE.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -514,6 +516,7 @@ rm -rf docs/README.{VMS,WIN32,OS2} #%patch15 -p1 #%patch13 -p1 ### +%patch16 -p1 %build rm -f src/mesa/depend diff --git a/u_mesa-gallium-llvmpipe-fix-SIGFPE.patch b/u_mesa-gallium-llvmpipe-fix-SIGFPE.patch new file mode 100644 index 0000000..db1f54a --- /dev/null +++ b/u_mesa-gallium-llvmpipe-fix-SIGFPE.patch @@ -0,0 +1,24 @@ +From: Takashi Iwai +Subject: Fix zero-division in llvmpipe_texture_layout() +References: bnc#879462 + +Fix the crash of "gnome-control-center info" invocation on QEMU where +zero height is passed at init. + +Signed-off-by: Takashi Iwai + +--- + src/gallium/drivers/llvmpipe/lp_texture.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/src/gallium/drivers/llvmpipe/lp_texture.c ++++ b/src/gallium/drivers/llvmpipe/lp_texture.c +@@ -115,7 +115,7 @@ llvmpipe_texture_layout(struct llvmpipe_ + lpr->row_stride[level] = align(nblocksx * block_size, util_cpu_caps.cacheline); + + /* if row_stride * height > LP_MAX_TEXTURE_SIZE */ +- if (lpr->row_stride[level] > LP_MAX_TEXTURE_SIZE / nblocksy) { ++ if (nblocksy && lpr->row_stride[level] > LP_MAX_TEXTURE_SIZE / nblocksy) { + /* image too large */ + goto fail; + }